(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:PERMS spids:[22]) op: Equal rhs: {($ VSub_Number '$1')} spids: [22] ) ] spids: [22] ) (C {(shift)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:ARGS spids:[28]) op: Equal rhs: {(DQ )} spids: [28] ) ] spids: [28] ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-gt)} {(1)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:ARGS spids:[48]) op: Equal rhs: {(DQ ($ VSub_Name '$ARGS') (' ') ($ VSub_Number '$1'))} spids: [48] ) ] spids: [48] ) (C {(shift)}) ] spids: [45 58] ) ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DEST spids:[60]) op: Equal rhs: {($ VSub_Number '$1')} spids: [60] ) ] spids: [60] ) (command.ForEach iter_name: SRC iter_words: [{($ VSub_Name '$ARGS')}] do_arg_iter: F body: (command.DoGroup children: [ (C {(cp)} {(-a)} {($ VSub_Name '$SRC')} {($ VSub_Name '$DEST')}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(-d)} {(DQ ($ VSub_Name '$DEST'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DESTFILE spids:[102]) op: Equal rhs: { (DQ ($ VSub_Name '$DEST') (/) (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(basename)} {(DQ ($ VSub_Name '$SRC'))})] ) left_token: <Left_CommandSub '$('> spids: [106 112] ) ) } spids: [102] ) ] spids: [102] ) ] spids: [16777215 99] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DESTFILE spids:[119]) op: Equal rhs: {(DQ ($ VSub_Name '$DEST'))} spids: [119] ) ] spids: [119] ) ] spids: [116 125] ) (command.SimpleCommand words: [{(chmod)} {($ VSub_Name '$PERMS')} {($ VSub_Name '$DESTFILE')}] redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})] ) ] spids: [73 146] ) spids: [69 71] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] )