(command.CommandList children: [ (command.ShFunction name_tok: <error> name: error body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ ($ Id.VSub_At '@'))}] redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <usage> name: usage body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <error> more_env: [] words: [{<error>} {(DQ <'usage: vigr [-d dir]'>)}] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <getopts> more_env: [] words: [{<getopts>} {<d> <Id.Lit_Colon ':'>} {<opt>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.Case case_kw: <Id.KW_Case case> to_match: (case_arg.Word w:{($ Id.VSub_DollarName opt)}) arms_start: <Id.KW_In in> arms: [ (CaseArm left: <d> pattern: (pat.Words words:[{<d>}]) middle: <Id.Right_CasePat _> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'etcdir='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'etcdir='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'etcdir='> name:etcdir) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name OPTARG))} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <Id.Lit_Star '*'> pattern: (pat.Words words:[{<Id.Lit_Star '*'>}]) middle: <Id.Right_CasePat _> action: [ (command.Simple blame_tok: <usage> more_env: [] words: [{<usage>}] redirects: [] do_fork: T ) ] right: <Id.Op_DSemi _> ) ] arms_end: <Id.KW_Esac esac> redirects: [] ) ] right: <Id.KW_Done done> ) redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'grpfile='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'grpfile='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'grpfile='> name:grpfile) op: assign_op.Equal rhs: { (DQ (BracedVarSub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_Name etcdir> var_name: etcdir suffix_op: (suffix_op.Unary op: <Id.VTest_ColonHyphen _> arg_word: {<Id.Lit_Slash '/'> <etc>} ) right: <Id.Right_DollarBrace '}'> ) <'/group'> ) } ) ] 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 '!'>} {<-f>} {(DQ (${ Id.VSub_Name grpfile))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <error> more_env: [] words: [{<error>} {(DQ <'Missing group file'>)}] redirects: [] do_fork: T ) ] spids: [193 211] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'tmpdir='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'tmpdir='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tmpdir='> name:tmpdir) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <mktemp> more_env: [] words: [{<mktemp>} {<-d>} {<-t>} {<vigr>}] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) } ) ] 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 '['>} {<-z>} {(DQ (${ Id.VSub_Name tmpdir))} {<-o>} {<Id.KW_Bang '!'>} {<-d>} {(DQ (${ Id.VSub_Name tmpdir))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <error> more_env: [] words: [{<error>} {(DQ <'Unable to create the temporary directory'>)}] redirects: [] do_fork: T ) ] spids: [237 265] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'tmpfile='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'tmpfile='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tmpfile='> name:tmpfile) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name tmpdir) <'/group'>)} ) ] redirects: [] ) (command.Simple blame_tok: <trap> more_env: [] words: [{<trap>} {(DQ <'exit 1'>)} {<INT>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <trap> more_env: [] words: [{<trap>} {(DQ <'rm -rf \''> (${ Id.VSub_Name tmpdir) <'\''>)} {<EXIT>}] redirects: [] do_fork: T ) (command.Simple blame_tok:<set> more_env:[] words:[{<set>} {<-e>}] redirects:[] do_fork:T) (command.Simple blame_tok: <cp> more_env: [] words: [{<cp>} {(DQ (${ Id.VSub_Name grpfile))} {(DQ (${ Id.VSub_Name tmpfile))}] redirects: [] do_fork: T ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_Colon ':'> more_env: [] words: [{<Id.Lit_Colon ':'>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.Simple blame_tok: <Id.Left_DollarBrace '${'> more_env: [] words: [ { (BracedVarSub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_Name EDITOR> var_name: EDITOR suffix_op: (suffix_op.Unary op: <Id.VTest_ColonHyphen _> arg_word: {<Id.Lit_Slash '/'> <usr> <Id.Lit_Slash '/'> <bin> <Id.Lit_Slash '/'> <vi>} ) right: <Id.Right_DollarBrace '}'> ) } {(DQ (${ Id.VSub_Name tmpfile))} ] 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: <chkgrp> more_env: [] words: [{<chkgrp>} {<-q>} {(DQ (${ Id.VSub_Name tmpfile))}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <install> more_env: [] words: [ {<install>} {<-b>} {<-m>} {<0644>} {<-C>} {<-S>} {(DQ (${ Id.VSub_Name tmpfile))} {(DQ (${ Id.VSub_Name grpfile))} ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<0>} ) ] spids: [366 380] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_Colon ':'> more_env: [] words: [{<Id.Lit_Colon ':'>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {<-n>} {(DQ <'Re-edit the group file? '>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <read> more_env: [] words: [{<read>} {<ans>}] redirects: [] do_fork: T ) (command.Case case_kw: <Id.KW_Case case> to_match: (case_arg.Word w:{($ Id.VSub_DollarName ans)}) arms_start: <Id.KW_In in> arms: [ (CaseArm left: <Id.Lit_LBracket '['> pattern: (pat.Words words: [ {<Id.Lit_LBracket '['> <Yy> <Id.Lit_RBracket ']'>} {<Id.Lit_LBracket '['> <Yy> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Ee> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Ss> <Id.Lit_RBracket ']'> } ] ) middle: <Id.Right_CasePat _> action: [(command.ControlFlow keyword:<Id.ControlFlow_Break break>)] right: <Id.Op_DSemi _> ) (CaseArm left: <Id.Lit_LBracket '['> pattern: (pat.Words words: [ {<Id.Lit_LBracket '['> <Nn> <Id.Lit_RBracket ']'>} {<Id.Lit_LBracket '['> <Nn> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <Oo> <Id.Lit_RBracket ']'> } ] ) middle: <Id.Right_CasePat _> action: [ (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] right: <Id.Op_DSemi _> ) ] arms_end: <Id.KW_Esac esac> redirects: [] ) ] right: <Id.KW_Done done> ) redirects: [] ) ] right: <Id.KW_Done done> ) redirects: [] ) ] )