(command.CommandList children: [ (command.ShAssignment left: <Id.Lit_VarLike 'timestamp='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'timestamp='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'timestamp='> name:timestamp) op: assign_op.Equal rhs: {(DQ <.timestamp>)} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'tempfile='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'tempfile='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tempfile='> name:tempfile) op: assign_op.Equal rhs: {(DQ <'/tmp/sftpsync.'> ($ Id.VSub_Dollar '$'))} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'count='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'count='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'count='> name:count) op: assign_op.Equal rhs: {<0>} ) ] redirects: [] ) (command.Simple blame_tok: <trap> more_env: [] words: [ {<trap>} { (DQ (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Simple blame_tok: <which> more_env: [] words: [{<which>} {<rm>}] redirects: [] do_fork: T ) right: <Id.Backtick_Right '`'> ) <' -f '> ($ Id.VSub_DollarName tempfile) ) } {<0>} {<1>} {<15>} ] redirects: [] do_fork: T ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'Usage: '> ($ Id.VSub_Number 0) <' user@host { remotedir }'>)}] redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [53 67] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'user='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'user='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'user='> name:user) op: assign_op.Equal rhs: { (DQ (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {($ Id.VSub_Number 1)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <cut> more_env: [] words: [{<cut>} {<-d> <Id.Lit_At '@'>} {<-f1>}] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) right: <Id.Eof_RParen _> ) ) } ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'server='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'server='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'server='> name:server) op: assign_op.Equal rhs: { (DQ (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {($ Id.VSub_Number 1)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <cut> more_env: [] words: [{<cut>} {<-d> <Id.Lit_At '@'>} {<-f2>}] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) right: <Id.Eof_RParen _> ) ) } ) ] redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<-gt>} {<1>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'cd '> ($ Id.VSub_Number 2))}] redirects: [ (Redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName tempfile)} ) ] do_fork: T ) ] spids: [126 140] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} {($ Id.VSub_DollarName timestamp)} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.ForEach keyword: <Id.KW_For for> iter_names: [filename] iterable: (for_iter.Words words:[{<Id.Lit_Star '*'>}]) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-f>} {(DQ ($ Id.VSub_DollarName filename))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'put -P '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\"'> ch: '"' ) ($ Id.VSub_DollarName filename) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') ) } ] redirects: [ (Redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName tempfile)} ) ] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'count='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'count='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'count='> name:count) op: assign_op.Equal rhs: { (word_part.ArithSub left: <Id.Left_DollarDParen '$(('> anode: (arith_expr.Binary op_id: Id.Arith_Plus left: {($ Id.VSub_DollarName count)} right: {<Id.Lit_Digits 1>} ) right: <Id.Right_DollarDParen _> ) } ) ] redirects: [] ) ] spids: [191 205] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] right: <Id.KW_Done done> ) redirects: [] ) ] spids: [157 171] ) ] else_kw: <Id.KW_Else else> else_action: [ (command.ForEach keyword: <Id.KW_For for> iter_names: [filename] iterable: (for_iter.Words words: [ { (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <find> more_env: [] words: [ {<find>} {<.>} {<-newer>} {($ Id.VSub_DollarName timestamp)} {<-type>} {<f>} {<-print>} ] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) } ] ) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'put -P '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\"'> ch: '"' ) ($ Id.VSub_DollarName filename) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') ) } ] redirects: [ (Redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName tempfile)} ) ] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'count='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'count='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'count='> name:count) op: assign_op.Equal rhs: { (word_part.ArithSub left: <Id.Left_DollarDParen '$(('> anode: (arith_expr.Binary op_id: Id.Arith_Plus left: {($ Id.VSub_DollarName count)} right: {<Id.Lit_Digits 1>} ) right: <Id.Right_DollarDParen _> ) } ) ] redirects: [] ) ] right: <Id.KW_Done done> ) redirects: [] ) ] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName count)} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ ($ Id.VSub_Number 0) <': No files require uploading to '> ($ Id.VSub_DollarName server) ) } ] redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [302 316] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <quit>)}] redirects: [ (Redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName tempfile)} ) ] do_fork: T ) (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'Synchronizing: Found '> ($ Id.VSub_DollarName count) <' files in local folder to upload.'> ) } ] redirects: [] do_fork: T ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline negated: <Id.KW_Bang '!'> children: [ (command.Simple blame_tok: <sftp> more_env: [] words: [ {<sftp>} {<-b>} {($ Id.VSub_DollarName tempfile)} {(DQ ($ Id.VSub_DollarName user) <'@'> ($ Id.VSub_DollarName server))} ] redirects: [] do_fork: T ) ] ops: [] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} {(DQ <'Done. All files synchronized up with '> ($ Id.VSub_DollarName server))} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <touch> more_env: [] words: [{<touch>} {($ Id.VSub_DollarName timestamp)}] redirects: [] do_fork: T ) ] spids: [358 376] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )