(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:HOST_AFFINITY) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [(C {<lscpu>} {<-p> <Id.Lit_Equals '='> <cpu>}) (C {<tail>} {<-1>})] negated: F ) ) } spids: [13] ) ] ) (command.ForEach iter_name: cpu iter_words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<seq>} {<0>} {($ Id.VSub_DollarName '$HOST_AFFINITY')}) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Subshell child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_At '$@'))}) (command.Simple words: [{<grep>} {<-e>} {(DQ <--sleep>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) ] negated: F ) ) (C {<test>} {($ Id.VSub_DollarName '$HOST_AFFINITY')} {(SQ <'!='>)} {($ Id.VSub_DollarName '$cpu')} ) ] ) ] ) action: [ (C {<echo>} {(DQ <'GUEST AFFINITY '> ($ Id.VSub_DollarName '$cpu'))}) (C {(DQ ($ Id.VSub_At '$@'))} {<--host-affinity>} {($ Id.VSub_DollarName '$HOST_AFFINITY')} {<--guest-affinity>} {($ Id.VSub_DollarName '$cpu')} ) ] spids: [57 97] ) ] ) ] ) ) (C {<echo>} {(DQ <'NO GUEST AFFINITY'>)}) (C {(DQ ($ Id.VSub_At '$@'))} {<--host-affinity>} {($ Id.VSub_DollarName '$HOST_AFFINITY')}) (C {<echo>} {(DQ <'NO AFFINITY'>)}) (C {(DQ ($ Id.VSub_At '$@'))}) ] )