(CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:delay) op:Equal rhs:{(2)} spids:[10])] spids: [10] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:psize) op:Equal rhs:{(DQ ('1200x900>'))} spids:[16])] spids: [16] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-eq)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Sentence child: (SimpleCommand words: [ {(echo)} { (DQ ('Usage: ') (CommandSubPart command_list: (CommandList children: [(C {(basename)} {($ VSub_Number '$0')})] ) left_token: <Left_CommandSub '$('> spids: [46 50] ) (' watch-directory') ) } ] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) terminator: <Op_Semi ';'> ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 39] ) ] spids: [16777215 63] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:watch) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [66] ) ] spids: [66] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-d)} {(DQ ($ VSub_Name '$watch'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Sentence child: (SimpleCommand words: [ {(echo)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(basename)} {($ VSub_Number '$0')})] ) left_token: <Left_CommandSub '$('> spids: [94 98] ) (': specified watch directory ') ($ VSub_Name '$watch') (" isn't a directory") ) } ] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) terminator: <Op_Semi ';'> ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 88] ) ] spids: [16777215 113] ) (C {(cd)} {(DQ ($ VSub_Name '$watch'))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_QMark '$?')} {(-ne)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Sentence child: (SimpleCommand words: [ {(echo)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(basename)} {($ VSub_Number '$0')})] ) left_token: <Left_CommandSub '$('> spids: [143 147] ) (': failed trying to cd into ') ($ VSub_Name '$watch') ) } ] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) terminator: <Op_Semi ';'> ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 137] ) ] spids: [16777215 161] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:suffixes) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(Lit_Other '\xef') (Lit_Other '\x81') (Lit_Other '\xb6') (file)} {(Lit_Other '*')} ) (C {(grep)} {(image)}) (C {(cut)} {(-d) (Lit_Other ':')} {(-f1)}) (C {(rev)}) (C {(cut)} {(-d.)} {(-f1)}) (C {(rev)}) (C {(sort)}) (C {(uniq)}) (C {(sed)} {(SQ <'s/^/\\*./'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [166 222] ) ) } spids: [164] ) ] spids: [164] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$suffixes'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Sentence child: (SimpleCommand words: [ {(echo)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(basename)} {($ VSub_Number '$0')})] ) left_token: <Left_CommandSub '$('> spids: [246 250] ) (': no images to display in folder ') ($ VSub_Name '$watch') ) } ] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) terminator: <Op_Semi ';'> ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 240] ) ] spids: [16777215 264] ) (C {(/bin/echo)} {(-n)} { (DQ ('Displaying ') (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [(C {(ls)} {($ VSub_Name '$suffixes')}) (C {(wc)} {(-l)})] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [273 283] ) (' images from ') ($ VSub_Name '$watch') (' ') ) } ) (CommandList children: [ (Sentence child:(C {(set)} {(-f)}) terminator:<Op_Semi ';'>) (Sentence child: (C {(echo)} {(with)} {(suffixes)} {($ VSub_Name '$suffixes')}) terminator: <Op_Semi ';'> ) (C {(set)} {(Lit_Other '+') (f)}) ] ) (C {(display)} {(-loop)} {(0)} {(-delay)} {($ VSub_Name '$delay')} {(-resize)} {($ VSub_Name '$psize')} {(-backdrop)} {($ VSub_Name '$suffixes')} ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] )