(command.CommandList children: [ (C {<Id.KW_Set set>} {<-e>}) (C {<export>} {<Id.Lit_VarLike 'LC_ALL='> <C>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-lt>} {<3>} {<Id.Lit_RBracket ']'>}) terminator: <Id.Op_Semi _> ) ] action: [ (command.Simple words: [ {<echo>} { (DQ <'usage: '> ($ Id.VSub_Number '$0') <' OLD-FILE NEW-FILE FILES-TO-BE-PATCHED...'>) } ] redirects: [(redir.Redir op:<Id.Redir_GreatAnd '1>&'> fd:1 arg_word:{<2>})] ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<2>}) ] spids: [65 78] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:old_file) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [100] ) ] ) (C {<shift>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:new_file) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [107] ) ] ) (C {<shift>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tmp_old_sorted) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children:[(C {<mktemp>})]) ) ) } spids: [115] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tmp_new_sorted) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children:[(C {<mktemp>})]) ) ) } spids: [122] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tmp_new_symbols) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children:[(C {<mktemp>})]) ) ) } spids: [129] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tmp_patched) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children:[(C {<mktemp>})]) ) ) } spids: [136] ) ] ) (command.ShFunction name: cleanup body: (command.BraceGroup children: [ (C {<rm>} {<-f>} {<-->} {(DQ ($ Id.VSub_DollarName '$tmp_old_sorted'))} {(DQ ($ Id.VSub_DollarName '$tmp_new_sorted'))} {(DQ ($ Id.VSub_DollarName '$tmp_new_symbols'))} {(DQ ($ Id.VSub_DollarName '$tmp_patched'))} ) ] ) ) (C {<trap>} {<cleanup>} {<0>}) (C {<sort>} {<-u>} {<-o>} {(DQ ($ Id.VSub_DollarName '$tmp_old_sorted'))} {<-->} {(DQ ($ Id.VSub_DollarName '$old_file'))} ) (C {<sort>} {<-u>} {<-o>} {(DQ ($ Id.VSub_DollarName '$tmp_new_sorted'))} {<-->} {(DQ ($ Id.VSub_DollarName '$new_file'))} ) (command.Simple words: [ {<comm>} {<-1>} {<-3>} {(DQ ($ Id.VSub_DollarName '$tmp_old_sorted'))} {(DQ ($ Id.VSub_DollarName '$tmp_new_sorted'))} ] redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$tmp_new_symbols'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:new_symbol_count) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Simple words: [{<wc>} {<-l>}] redirects: [ (redir.Redir op: <Id.Redir_Less '<'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$tmp_new_symbols'))} ) ] ) ] ) ) ) } spids: [246] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$new_symbol_count'))} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.Simple words: [{<echo>} {(DQ <'info: no symbols added'>)}] redirects: [(redir.Redir op:<Id.Redir_GreatAnd '1>&'> fd:1 arg_word:{<2>})] ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] spids: [261 276] ) ] ) (command.Simple words: [{<echo>} {(DQ <'info: '> ($ Id.VSub_DollarName '$new_symbol_count') <' symbol(s) added'>)}] redirects: [(redir.Redir op:<Id.Redir_GreatAnd '1>&'> fd:1 arg_word:{<2>})] ) (command.ForEach iter_name: to_be_patched iter_words: [{(DQ ($ Id.VSub_At '$@'))}] do_arg_iter: F body: (command.DoGroup children: [ (C {<sort>} {<-u>} {<-o>} {(DQ ($ Id.VSub_DollarName '$tmp_patched'))} {<-->} {(DQ ($ Id.VSub_DollarName '$to_be_patched'))} {(DQ ($ Id.VSub_DollarName '$tmp_new_symbols'))} ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (C {<cmp>} {<-s>} {<-->} {(DQ ($ Id.VSub_DollarName '$to_be_patched'))} {(DQ ($ Id.VSub_DollarName '$tmp_patched'))} ) ] negated: T ) terminator: <Id.Op_Semi _> ) ] action: [ (command.Simple words: [ {<echo>} {(DQ <'info: updating '> ($ Id.VSub_DollarName '$to_be_patched'))} ] redirects: [(redir.Redir op:<Id.Redir_GreatAnd '1>&'> fd:1 arg_word:{<2>})] ) (C {<cp>} {<-->} {(DQ ($ Id.VSub_DollarName '$tmp_patched'))} {(DQ ($ Id.VSub_DollarName '$to_be_patched'))} ) ] spids: [344 363] ) ] ) ] ) ) ] )