(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'usage='> name:usage) op: assign_op.Equal rhs: {(DQ <'usage: diff3 file1 file2 file3'>)} spids: [85] ) ] redirects: [] ) (command.ShFunction name: mktmpdir body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tmpdir='> name:tmpdir) op: assign_op.Equal rhs: {<'/tmp/diff3.'> ($ Id.VSub_Dollar '$')} spids: [111] ) ] redirects: [] ) (C {<trap>} {(SQ <'/usr/bin/rm -rf $tmpdir'>)} {<0>} {<1>} {<2>} {<3>} {<13>} {<15>}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<'/usr/bin/mkdir'>} {<-m>} {<700>} {($ Id.VSub_DollarName tmpdir)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (C {<mktmpdir>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'e='> name:e) op: assign_op.Equal rhs: (rhs_word.Empty) spids: [154] ) ] redirects: [] ) (command.Case to_match: {($ Id.VSub_Number 1)} arms: [ (case_arm pat_list: [{<-> <Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'e='> name:e) op: assign_op.Equal rhs: {($ Id.VSub_Number 1)} spids: [167] ) ] redirects: [] ) (C {<shift>}) ] spids: [162 164 172 -1] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<3>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {(${ Id.VSub_Name usage)}] redirects: [(redir op:<Id.Redir_GreatAnd '1>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] more_env: [] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [176 190] ) ] else_action: [] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\('> ch:'(')} {<-f>} {($ Id.VSub_Number 1)} {<-o>} {<-c>} {($ Id.VSub_Number 1)} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\)'> ch:')')} {<-a>} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\('> ch:'(')} {<-f>} {($ Id.VSub_Number 2)} {<-o>} {<-c>} {($ Id.VSub_Number 2)} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\)'> ch:')')} {<-a>} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\('> ch:'(')} {<-f>} {($ Id.VSub_Number 3)} {<-o>} {<-c>} {($ Id.VSub_Number 3)} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\)'> ch:')')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<Id.Lit_Colon ':'>})] spids: [209 262] ) ] else_action: [ (command.Simple words: [{<echo>} {(${ Id.VSub_Name usage)}] redirects: [(redir op:<Id.Redir_GreatAnd '1>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] more_env: [] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'f1='> name:f1) op: assign_op.Equal rhs: {($ Id.VSub_Number 1)} spids: [286] ) (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'f2='> name:f2) op: assign_op.Equal rhs: {($ Id.VSub_Number 2)} spids: [289] ) (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'f3='> name:f3) op: assign_op.Equal rhs: {($ Id.VSub_Number 3)} spids: [292] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-c>} {($ Id.VSub_DollarName f1)} {<Id.Lit_RBracket ']'>}) ] ) action: [ (command.Simple words: [{<'/usr/bin/cat'>} {($ Id.VSub_DollarName f1)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName tmpdir) <'/d3c'> ($ Id.VSub_Dollar '$')} ) ] more_env: [] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'f1='> name:f1) op: assign_op.Equal rhs: {($ Id.VSub_DollarName tmpdir) <'/d3c'> ($ Id.VSub_Dollar '$')} spids: [319] ) ] redirects: [] ) ] spids: [295 305] ) ] else_action: [] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-c>} {($ Id.VSub_DollarName f2)} {<Id.Lit_RBracket ']'>}) ] ) action: [ (command.Simple words: [{<'/usr/bin/cat'>} {($ Id.VSub_DollarName f2)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName tmpdir) <'/d3d'> ($ Id.VSub_Dollar '$')} ) ] more_env: [] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'f2='> name:f2) op: assign_op.Equal rhs: {($ Id.VSub_DollarName tmpdir) <'/d3d'> ($ Id.VSub_Dollar '$')} spids: [350] ) ] redirects: [] ) ] spids: [326 336] ) ] else_action: [] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-c>} {($ Id.VSub_DollarName f3)} {<Id.Lit_RBracket ']'>}) ] ) action: [ (command.Simple words: [{<'/usr/bin/cat'>} {($ Id.VSub_DollarName f3)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName tmpdir) <'/d3e'> ($ Id.VSub_Dollar '$')} ) ] more_env: [] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'f3='> name:f3) op: assign_op.Equal rhs: {($ Id.VSub_DollarName tmpdir) <'/d3e'> ($ Id.VSub_Dollar '$')} spids: [381] ) ] redirects: [] ) ] spids: [357 367] ) ] else_action: [] redirects: [] ) (command.Simple words: [{<'/usr/bin/diff'>} {($ Id.VSub_DollarName f1)} {($ Id.VSub_DollarName f3)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName tmpdir) <'/d3a'> ($ Id.VSub_Dollar '$')} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {($ Id.VSub_DollarName tmpdir) <'/d3a'> ($ Id.VSub_Dollar '$') <.err>} ) ] more_env: [] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'STATUS='> name:STATUS) op: assign_op.Equal rhs: {($ Id.VSub_QMark '?')} spids: [408] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName STATUS)} {<-eq>} {<1>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<'/usr/xpg4/bin/grep'>} {<-q>} {(DQ <'^[<>]'>)} {($ Id.VSub_DollarName tmpdir) <'/d3a'> ($ Id.VSub_Dollar '$')} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'RET='> name:RET) op: assign_op.Equal rhs: {($ Id.VSub_QMark '?')} spids: [439] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName RET)} {<-eq>} {<1>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<'/usr/bin/cat'>} {($ Id.VSub_DollarName tmpdir) <'/d3a'> ($ Id.VSub_Dollar '$')} ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName STATUS)} ) ] spids: [443 456] ) ] else_action: [] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName RET)} {<-gt>} {<1>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.Simple words: [{<echo>} {(DQ <'diff3 failed'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] more_env: [] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName STATUS)} ) ] spids: [475 488] ) ] else_action: [] redirects: [] ) ] spids: [411 423] ) ] else_action: [] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName STATUS)} {<-gt>} {<1>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<'/usr/bin/cat'>} {($ Id.VSub_DollarName tmpdir) <'/d3a'> ($ Id.VSub_Dollar '$') <.err>} ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName STATUS)} ) ] spids: [511 523] ) ] else_action: [] redirects: [] ) (command.Simple words: [{<'/usr/bin/diff'>} {($ Id.VSub_DollarName f2)} {($ Id.VSub_DollarName f3)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName tmpdir) <'/d3b'> ($ Id.VSub_Dollar '$')} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {($ Id.VSub_DollarName tmpdir) <'/d3b'> ($ Id.VSub_Dollar '$') <.err>} ) ] more_env: [] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'STATUS='> name:STATUS) op: assign_op.Equal rhs: {($ Id.VSub_QMark '?')} spids: [560] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName STATUS)} {<-eq>} {<1>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<'/usr/xpg4/bin/grep'>} {<-q>} {(DQ <'^[<>]'>)} {($ Id.VSub_DollarName tmpdir) <'/d3b'> ($ Id.VSub_Dollar '$')} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'RET='> name:RET) op: assign_op.Equal rhs: {($ Id.VSub_QMark '?')} spids: [591] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName RET)} {<-eq>} {<1>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<'/usr/bin/cat'>} {($ Id.VSub_DollarName tmpdir) <'/d3b'> ($ Id.VSub_Dollar '$')} ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName STATUS)} ) ] spids: [595 608] ) ] else_action: [] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName RET)} {<-gt>} {<1>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.Simple words: [{<echo>} {(DQ <'diff3 failed'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] more_env: [] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName STATUS)} ) ] spids: [627 640] ) ] else_action: [] redirects: [] ) ] spids: [563 575] ) ] else_action: [] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName STATUS)} {<-gt>} {<1>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<'/usr/bin/cat'>} {($ Id.VSub_DollarName tmpdir) <'/d3b'> ($ Id.VSub_Dollar '$') <.err>} ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName STATUS)} ) ] spids: [663 675] ) ] else_action: [] redirects: [] ) (C {<'/usr/lib/diff3prog'>} {($ Id.VSub_DollarName e)} {($ Id.VSub_DollarName tmpdir) <'/d3'> <Id.Lit_LBracket '['> <ab> <Id.Lit_RBracket ']'> ($ Id.VSub_Dollar '$') } {($ Id.VSub_DollarName f1)} {($ Id.VSub_DollarName f2)} {($ Id.VSub_DollarName f3)} ) ] )