(command.CommandList children: [ (command.ShAssignment left: <Id.Lit_VarLike 'wmfile='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'wmfile='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'wmfile='> name:wmfile) op: assign_op.Equal rhs: {(DQ <'/tmp/watermark.'> ($ Id.VSub_Dollar '$') <.png>)} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'fontsize='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'fontsize='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'fontsize='> name:fontsize) op: assign_op.Equal rhs: {(DQ <44>)} ) ] 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 wmfile) ) } {<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 '#')} {<-ne>} {<2>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Sentence child: (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'Usage: '> (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <basename> more_env: [] words: [{<basename>} {($ Id.VSub_Number 0)}] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) <' imagefile '> ) <watermark> } {<text> (DQ )} ] redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [50 64] ) ] 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 '!'>} {<-r>} {(DQ ($ Id.VSub_Number 1))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Sentence child: (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <basename> more_env: [] words: [{<basename>} {($ Id.VSub_Number 0)}] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) <': Can\'t read input image '> ($ Id.VSub_Number 1) ) } ] redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [96 112] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'dimensions='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'dimensions='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'dimensions='> name:dimensions) op: assign_op.Equal rhs: { (DQ (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <identify> more_env: [] words: [{<identify>} {<-format>} {(DQ <'%G'>)} {(DQ ($ Id.VSub_Number 1))}] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) ) } ) ] redirects: [] ) (command.Simple blame_tok: <convert> more_env: [] words: [ {<convert>} {<-size>} {($ Id.VSub_DollarName dimensions)} {<xc> <Id.Lit_Colon ':'> <none>} {<-pointsize>} {($ Id.VSub_DollarName fontsize)} {<-gravity>} {<south>} {<-draw>} { (DQ <'fill black text 1,1 \''> ($ Id.VSub_Number 2) <'\' text 0,0 \''> ($ Id.VSub_Number 2) <'\' fill white text 2,2 \''> ($ Id.VSub_Number 2) <'\''> ) } {($ Id.VSub_DollarName wmfile)} ] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'suffix='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'suffix='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'suffix='> name:suffix) 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: <rev> more_env: [] words: [{<rev>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <cut> more_env: [] words: [{<cut>} {<-d.>} {<-f1>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <rev> more_env: [] words: [{<rev>}] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _> <Id.Op_Pipe _> <Id.Op_Pipe _>] ) right: <Id.Eof_RParen _> ) ) } ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'prefix='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'prefix='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prefix='> name:prefix) 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: <rev> more_env: [] words: [{<rev>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <cut> more_env: [] words: [{<cut>} {<-d.>} {<-f2->}] redirects: [] do_fork: T ) (command.Simple blame_tok: <rev> more_env: [] words: [{<rev>}] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _> <Id.Op_Pipe _> <Id.Op_Pipe _>] ) right: <Id.Eof_RParen _> ) ) } ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'newfilename='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'newfilename='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'newfilename='> name:newfilename) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName prefix) <'+wm.'> ($ Id.VSub_DollarName suffix))} ) ] redirects: [] ) (command.Simple blame_tok: <composite> more_env: [] words: [ {<composite>} {<-dissolve>} {<75> <Id.Lit_Other '%'>} {<-gravity>} {<south>} {($ Id.VSub_DollarName wmfile)} {(DQ ($ Id.VSub_Number 1))} {(DQ ($ Id.VSub_DollarName newfilename))} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'Created new watermarked image file '> ($ Id.VSub_DollarName newfilename))}] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )