(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:timestamp) op:Equal rhs:{(DQ (.timestamp))} spids:[14])]
      spids: [14]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:tempfile)
          op: Equal
          rhs: {(DQ (/tmp/sftpsync.) ($ VSub_Dollar '$$'))}
          spids: [19]
        )
      ]
      spids: [19]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:count) op:Equal rhs:{(0)} spids:[25])]
      spids: [25]
    )
    (C {(trap)} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(which)} {(rm)})])
            left_token: <Left_Backtick '`'>
            spids: [32 36]
          ) (' -f ') ($ VSub_Name '$tempfile')
        )
      } {(0)} {(1)} {(15)}
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-eq)} {(0)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('Usage: ') ($ VSub_Number '$0') (' user@host { remotedir }'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[76])]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 65]
        )
      ]
      spids: [16777215 84]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:user)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (Pipeline
                          children: [
                            (C {(echo)} {($ VSub_Number '$1')})
                            (C {(cut)} {(-d) (Lit_Other '@')} {(-f1)})
                          ]
                          negated: F
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [89 102]
                )
              )
            }
          spids: [87]
        )
      ]
      spids: [87]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:server)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (Pipeline
                          children: [
                            (C {(echo)} {($ VSub_Number '$1')})
                            (C {(cut)} {(-d) (Lit_Other '@')} {(-f2)})
                          ]
                          negated: F
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [107 120]
                )
              )
            }
          spids: [105]
        )
      ]
      spids: [105]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-gt)} {(1)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('cd ') ($ VSub_Number '$2'))}]
              redirects: [
                (Redir
                  op_id: Redir_DGreat
                  fd: 16777215
                  arg_word: {($ VSub_Name '$tempfile')}
                  spids: [148]
                )
              ]
            )
          ]
          spids: [16777215 138]
        )
      ]
      spids: [16777215 152]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {($ VSub_Name '$timestamp')} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (ForEach
              iter_name: filename
              iter_words: [{(Lit_Other '*')}]
              do_arg_iter: F
              body: 
                (DoGroup
                  children: [
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Name '$filename'))} 
                                  {(Lit_Other ']')}
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (SimpleCommand
                              words: [
                                {(echo)}
                                {
                                  (DQ ('put -P ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) 
                                    ($ VSub_Name '$filename') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>)
                                  )
                                }
                              ]
                              redirects: [
                                (Redir
                                  op_id: Redir_DGreat
                                  fd: 16777215
                                  arg_word: {($ VSub_Name '$tempfile')}
                                  spids: [215]
                                )
                              ]
                            )
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:count)
                                  op: Equal
                                  rhs: 
                                    {
                                      (ArithSubPart
                                        anode: 
                                          (ArithBinary
                                            op_id: Arith_Plus
                                            left: (ArithWord w:{($ VSub_Name '$count')})
                                            right: (ArithWord w:{(Lit_Digits 1)})
                                          )
                                        spids: [221 230]
                                      )
                                    }
                                  spids: [220]
                                )
                              ]
                              spids: [220]
                            )
                          ]
                          spids: [16777215 203]
                        )
                      ]
                      spids: [16777215 233]
                    )
                  ]
                  spids: [185 236]
                )
              spids: [181 16777215]
            )
          ]
          spids: [16777215 169]
        )
      ]
      else_action: [
        (ForEach
          iter_name: filename
          iter_words: [
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [
                      (C {(find)} {(.)} {(-newer)} {($ VSub_Name '$timestamp')} {(-type)} {(f)} {(-print)})
                    ]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [247 261]
              )
            }
          ]
          do_arg_iter: F
          body: 
            (DoGroup
              children: [
                (SimpleCommand
                  words: [
                    {(echo)}
                    {
                      (DQ ('put -P ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) 
                        ($ VSub_Name '$filename') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>)
                      )
                    }
                  ]
                  redirects: [
                    (Redir
                      op_id: Redir_DGreat
                      fd: 16777215
                      arg_word: {($ VSub_Name '$tempfile')}
                      spids: [277]
                    )
                  ]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:count)
                      op: Equal
                      rhs: 
                        {
                          (ArithSubPart
                            anode: 
                              (ArithBinary
                                op_id: Arith_Plus
                                left: (ArithWord w:{($ VSub_Name '$count')})
                                right: (ArithWord w:{(Lit_Digits 1)})
                              )
                            spids: [283 292]
                          )
                        }
                      spids: [282]
                    )
                  ]
                  spids: [282]
                )
              ]
              spids: [264 295]
            )
          spids: [246 16777215]
        )
      ]
      spids: [238 297]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {($ VSub_Name '$count')} {(-eq)} {(0)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [
                {(echo)}
                {
                  (DQ ($ VSub_Number '$0') (': No files require uploading to ') ($ VSub_Name '$server'))
                }
              ]
              redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[325])]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 314]
        )
      ]
      spids: [16777215 333]
    )
    (SimpleCommand
      words: [{(echo)} {(DQ (quit))}]
      redirects: [
        (Redir
          op_id: Redir_DGreat
          fd: 16777215
          arg_word: {($ VSub_Name '$tempfile')}
          spids: [342]
        )
      ]
    )
    (C {(echo)} 
      {(DQ ('Synchronizing: Found ') ($ VSub_Name '$count') (' files in local folder to upload.'))}
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (Pipeline
                  children: [
                    (C {(sftp)} {(-b)} {($ VSub_Name '$tempfile')} 
                      {(DQ ($ VSub_Name '$user') ('@') ($ VSub_Name '$server'))}
                    )
                  ]
                  negated: T
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('Done. All files synchronized up with ') ($ VSub_Name '$server'))})
            (C {(touch)} {($ VSub_Name '$timestamp')})
          ]
          spids: [16777215 374]
        )
      ]
      spids: [16777215 389]
    )
    (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
  ]
)