(command.CommandList children: [ (C {(Id.Lit_Other ':')} { (braced_var_sub token: (Token id:Id.VSub_Name val:srcdir span_id:6) suffix_op: (suffix_op.Unary op_id:Id.VTest_Equals arg_word:{(.)}) ) } ) (command.CommandList children: [ (command.Sentence child: (C {(.)} {(DQ ($ Id.VSub_DollarName '$srcdir') (/init.sh))}) terminator: (Token id:Id.Op_Semi val:';' span_id:17) ) (C {(path_prepend_)} {(.)}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:too_big) op: assign_op.Equal rhs: {(99999999999999999999999999999999999999999999999999999999999999999999)} spids: [24] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(0)} spids: [27] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{(test-xstrtol)} {(1)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:38) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:42) fd: 2 arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [47] ) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{(test-xstrtol)} {(-1)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:54) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:58) fd: 2 arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [63] ) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{(test-xstrtol)} {(1k)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:70) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:74) fd: 2 arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [79] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{(test-xstrtol)} {(${ Id.VSub_Name too_big) (h)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:89) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:93) fd: 2 arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [98] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{(test-xstrtol)} {($ Id.VSub_DollarName '$too_big')}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:105) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:109) fd: 2 arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [114] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{(test-xstrtol)} {(x)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:121) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:125) fd: 2 arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [130] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{(test-xstrtol)} {(9x)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:137) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:141) fd: 2 arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [146] ) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{(test-xstrtol)} {(010)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:153) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:157) fd: 2 arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [162] ) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{(test-xstrtol)} {(MiB)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:172) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:176) fd: 2 arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [181] ) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{(test-xstrtoul)} {(1)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:192) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:196) fd: 2 arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [201] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{(test-xstrtoul)} {(-1)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:208) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:212) fd: 2 arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [217] ) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{(test-xstrtoul)} {(1k)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:224) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:228) fd: 2 arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [233] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{(test-xstrtoul)} {(${ Id.VSub_Name too_big) (h)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:243) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:247) fd: 2 arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [252] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{(test-xstrtoul)} {($ Id.VSub_DollarName '$too_big')}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:259) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:263) fd: 2 arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [268] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{(test-xstrtoul)} {(x)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:275) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:279) fd: 2 arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [284] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{(test-xstrtoul)} {(9x)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:291) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:295) fd: 2 arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [300] ) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{(test-xstrtoul)} {(010)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:307) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:311) fd: 2 arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [316] ) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{(test-xstrtoul)} {(MiB)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:323) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:327) fd: 2 arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [332] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (C {(echo)} {(solaris)}) (C {(tr)} {(-d)} {(SQ (Token id:Id.Lit_Chars val:'\\r' span_id:355))}) (command.Simple words: [{(grep)} {(solais)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:364) fd: -1 arg_word: {(/dev/null)} ) ] ) ] negated: F ) terminator: (Token id:Id.Op_Semi val:';' span_id:367) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cr) op: assign_op.Equal rhs: {(SQ (Token id:Id.Lit_Chars val:'\\015' span_id:374))} spids: [372] ) ] ) ] spids: [342 369] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cr) op: assign_op.Equal rhs: {(SQ (Token id:Id.Lit_Chars val:'\\r' span_id:382))} spids: [380] ) ] ) ] ) (command.Simple words: [{(tr)} {(-d)} {(DQ ($ Id.VSub_DollarName '$cr'))}] redirects: [ (redir.Redir op:(Token id:Id.Redir_Less val:'<' span_id:402) fd:-1 arg_word:{(out)}) (redir.Redir op:(Token id:Id.Redir_Great val:'>' span_id:406) fd:-1 arg_word:{(k)}) ] more_env: [(env_pair name:LC_ALL val:{(C)} spids:[391])] ) (C {(mv)} {(k)} {(out)}) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:422) fd: -1 arg_word: {(expected)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:426) fd: -1 here_begin: {(EOF)} here_end_span_id: 460 stdin_parts: [ ('1->1 ()\n') ('-1->-1 ()\n') ('1k->1024 ()\n') ("invalid suffix in X argument '") (${ Id.VSub_Name too_big) ("h'\n") ("X argument '") ($ Id.VSub_DollarName '$too_big') ("' too large\n") ("invalid X argument 'x'\n") ("invalid suffix in X argument '9x'\n") ('010->8 ()\n') ('MiB->1048576 ()\n') ('1->1 ()\n') ("invalid X argument '-1'\n") ('1k->1024 ()\n') ("invalid suffix in X argument '") (${ Id.VSub_Name too_big) ("h'\n") ("X argument '") ($ Id.VSub_DollarName '$too_big') ("' too large\n") ("invalid X argument 'x'\n") ("invalid suffix in X argument '9x'\n") ('010->8 ()\n') ('MiB->1048576 ()\n') ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(compare)} {(expected)} {(out)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:result) op: assign_op.Equal rhs: {(1)} spids: [470] ) ] ) ] ) (C {(Exit)} {($ Id.VSub_DollarName '$result')}) ] )