(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:archivedir) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$HOME') (/.deleted-files))} spids: [32] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:realrm) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:40) command_list: (command.CommandList children:[(C {(which)} {(rm)})]) ) ) } spids: [38] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:copy) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:49) command_list: (command.CommandList children:[(C {(which)} {(cp)})]) ) (' -R') ) } spids: [47] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {($ Id.VSub_Pound '$#')} {(-eq)} {(0)} {(Id.Lit_RBracket ']')}) terminator: (Token id:Id.Op_Semi val:';' span_id:70) ) ] action: [(C {(exec)} {($ Id.VSub_DollarName '$realrm')})] spids: [58 72] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:flags) op: assign_op.Equal rhs: {(DQ )} spids: [92] ) ] ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:97) cond: [(C {(getopts)} {(DQ (dfiPRrvW))} {(opt)})] body: (command.DoGroup children: [ (command.Case to_match: {($ Id.VSub_DollarName '$opt')} arms: [ (case_arm pat_list: [{(f)}] action: [(C {(exec)} {($ Id.VSub_DollarName '$realrm')} {(DQ ($ Id.VSub_At '$@'))})] spids: [117 119 129 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:flags) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$flags') (' -') ($ Id.VSub_DollarName '$opt')) } spids: [139] ) ] ) ] spids: [135 137 146 -1] ) ] ) ] ) ) (C {(shift)} { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$OPTIND')}) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-d)} {($ Id.VSub_DollarName '$archivedir')} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:193) ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-w)} {($ Id.VSub_DollarName '$HOME')} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:210) ) ] action: [ (command.Simple words: [ {(echo)} { (DQ ($ Id.VSub_Number '$0') (" failed: can't create ") ($ Id.VSub_DollarName '$archivedir') (' in ') ($ Id.VSub_DollarName '$HOME') ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:225) fd: -1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:230) arg_word: {(1)} ) ] spids: [198 212] ) ] ) (C {(mkdir)} {($ Id.VSub_DollarName '$archivedir')}) (C {(chmod)} {(700)} {($ Id.VSub_DollarName '$archivedir') (Id.Lit_Pound '#')} {(a)} {(little)} {(bit)} {(of)} {(privacy) (Id.Lit_Comma ',')} {(please)} ) ] spids: [181 195] ) ] ) (command.ForEach iter_name: arg do_arg_iter: T body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:newname) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$archivedir') (/) (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:278) command_list: (command.CommandList children: [(C {(date)} {(DQ ('+%S.%M.%H.%d.%m'))})] ) ) (.) (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:286) command_list: (command.CommandList children: [(C {(basename)} {(DQ ($ Id.VSub_DollarName '$arg'))})] ) ) ) } spids: [274] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(-f)} {(DQ ($ Id.VSub_DollarName '$arg'))} {(-o)} {(-d)} {(DQ ($ Id.VSub_DollarName '$arg'))} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:316) ) ] action: [ (C {($ Id.VSub_DollarName '$copy')} {(DQ ($ Id.VSub_DollarName '$arg'))} {(DQ ($ Id.VSub_DollarName '$newname'))} ) ] spids: [296 318] ) ] ) ] ) ) (C {(exec)} {($ Id.VSub_DollarName '$realrm')} {($ Id.VSub_DollarName '$flags')} {(DQ ($ Id.VSub_At '$@'))} ) ] )