(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:<Id.Left_DollarParen '$('> child:(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:<Id.Left_DollarParen '$('> child:(C {<which>} {<cp>})) <' -R'> ) } spids: [47] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) 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: <Id.KW_While while> cond: (condition.Shell commands:[(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: {($ Id.VSub_DollarName '$OPTIND')} right: {<Id.Lit_Digits 1>} ) ) } ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} {($ Id.VSub_DollarName '$archivedir')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-w>} {($ Id.VSub_DollarName '$HOME')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) 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 op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> 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: <Id.Left_DollarParen '$('> child: (C {<date>} {(DQ <'+%S.%M.%H.%d.%m'>)}) ) <.> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<basename>} {(DQ ($ Id.VSub_DollarName '$arg'))}) ) ) } spids: [274] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} {(DQ ($ Id.VSub_DollarName '$arg'))} {<-o>} {<-d>} {(DQ ($ Id.VSub_DollarName '$arg'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) 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 '$@'))} ) ] )