(command.CommandList children: [ (C {(Id.KW_Set set)} {(-u) ($ Id.VSub_DollarName '$DX')}) (command.Case to_match: {($ Id.VSub_Pound '$#')} arms: [ (case_arm pat_list: [{(2)}] action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OLDTAB) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [115] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:118) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NEWTAB) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [120] ) ] ) ] spids: [111 113 123 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (C {(echo)} { (DQ ('Usage: ') (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:134) command_list: (command.CommandList children: [(C {(basename)} {($ Id.VSub_Number '$0')})] ) ) (' <Input> <Output>') ) } ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:145) arg_word: {(1)} ) ] spids: [126 128 -1 149] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-r)} {($ Id.VSub_DollarName '$OLDTAB')} {(Id.Lit_RBracket ']')} ) ] action: [ (C {(echo)} { (DQ (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:170) command_list: (command.CommandList children: [(C {(basename)} {($ Id.VSub_Number '$0')})] ) ) (': ') ($ Id.VSub_DollarName '$OLDTAB') (' does not exist or is unreadable.') ) } ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:183) arg_word: {(1)} ) ] spids: [152 164] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Simple words: [{(touch)} {($ Id.VSub_DollarName '$NEWTAB')}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:196) fd: 2 arg_word: {(/dev/null)} ) ] ) ] action: [(C {(Id.Lit_Other ':')})] spids: [190 200] ) ] else_action: [ (C {(echo)} { (DQ (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:211) command_list: (command.CommandList children: [(C {(basename)} {($ Id.VSub_Number '$0')})] ) ) (': cannot write to ') ($ Id.VSub_DollarName '$NEWTAB') (.) ) } ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:224) arg_word: {(1)} ) ] ) (command.Simple words: [{(cat)}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:234) fd: -1 here_begin: {(END_OF_HEADER)} here_end_span_id: 288 stdin_parts: [ ('# /etc/bootptab: database for bootp server (/etc/bootpd)\n') ('# This file was generated automagically\n') ('\n') ("# Blank lines and lines beginning with '#' are ignored.\n") ('#\n') ('# Legend:\t(see bootptab.5)\n') ('#\tfirst field -- hostname (not indented)\n') ('#\tbf -- bootfile\n') ('#\tbs -- bootfile size in 512-octet blocks\n') ('#\tcs -- cookie servers\n') ('#\tdf -- dump file name\n') ('#\tdn -- domain name\n') ('#\tds -- domain name servers\n') ('#\tef -- extension file\n') ('#\tgw -- gateways\n') ('#\tha -- hardware address\n') ('#\thd -- home directory for bootfiles\n') ('#\thn -- host name set for client\n') ('#\tht -- hardware type\n') ('#\tim -- impress servers\n') ('#\tip -- host IP address\n') ('#\tlg -- log servers\n') ('#\tlp -- LPR servers\n') ('#\tns -- IEN-116 name servers\n') ('#\tra -- reply address\n') ('#\trl -- resource location protocol servers\n') ('#\trp -- root path\n') ('#\tsa -- boot server address\n') ('#\tsm -- subnet mask\n') ('#\tsw -- swap server\n') ('#\ttc -- template host (points to similar host entry)\n') ('#\ttd -- TFTP directory\n') ('#\tto -- time offset (seconds)\n') ('#\tts -- time servers\n') ('#\tvm -- vendor magic number\n') ('#\tTn -- generic option tag n\n') ('#\n') ("# Be careful about including backslashes where they're needed. Weird (bad)\n") ('# things can happen when a backslash is omitted where one is intended.\n') ('# Also, note that generic option data must be either a string or a\n') ('# sequence of bytes where each byte is a two-digit hex value.\n') ('\n') ('# First, we define a global entry which specifies the stuff every host uses.\n') ('# (Host name lookups are relative to the domain: your.domain.name)\n') ('\n') ] ) (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:238) fd: -1 arg_word: {($ Id.VSub_DollarName '$NEWTAB')} ) ] ) (command.Pipeline children: [ (command.Simple words: [{(sed)} {(-e)} {(SQ (Token id:Id.Lit_Chars val:'s/[:-]//g' span_id:301))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Less val:'<' span_id:304) fd: -1 arg_word: {($ Id.VSub_DollarName '$OLDTAB')} ) ] ) (command.Simple words: [ {(nawk)} { (SQ (Token id: Id.Lit_Chars val: 'BEGIN\t{ PART = 0 ; FIELD=0 ; BOOTPATH="unset" ; BOOTFILE="unset" }\n' span_id: 314 ) (Token id:Id.Lit_Chars val:'\t/^%%/\t{\n' span_id:315) (Token id:Id.Lit_Chars val:'\t\t\t\tPART = 1\n' span_id:316) (Token id: Id.Lit_Chars val: '\t\t\t\tprintf ".default:\\\\\\n\\t:ht=ether:\\\\\\n\\t:hn:\\\\\\n\\t:dn=your.domain.name:\\\\\\n\\t:ds=your,dns,servers:\\\\\\n\\t:sm=255.255.0.0:\\\\\\n\\t:hd=%s:\\\\\\n\\t:rp=%s:\\\\\\n\\t:td=%s:\\\\\\n\\t:bf=%s:\\\\\\n\\t:to=auto:\\n\\n", BOOTPATH, BOOTPATH, BOOTPATH, BOOTFILE\n' span_id: 317 ) (Token id:Id.Lit_Chars val:'\t\t\t\tnext\n' span_id:318) (Token id:Id.Lit_Chars val:'\t\t\t}\n' span_id:319) (Token id:Id.Lit_Chars val:'\t/^$/\t{ next }\n' span_id:320) (Token id:Id.Lit_Chars val:'\t/^#/\t{ next }\n' span_id:321) (Token id:Id.Lit_Chars val:'\t\t{\n' span_id:322) (Token id: Id.Lit_Chars val: '\t\t\tif ( PART == 0 && FIELD < 2 )\n' span_id: 323 ) (Token id:Id.Lit_Chars val:'\t\t \t{\n' span_id:324) (Token id: Id.Lit_Chars val: '\t\t\t\tif ( FIELD == 0 ) BOOTPATH=$1\n' span_id: 325 ) (Token id:Id.Lit_Chars val:'\t\t\t\tif ( FIELD == 1 ) BOOTFILE=$1\n' span_id:326) (Token id:Id.Lit_Chars val:'\t\t\t\tFIELD++\n' span_id:327) (Token id:Id.Lit_Chars val:'\t\t\t}\n' span_id:328) (Token id:Id.Lit_Chars val:'\t\t}\n' span_id:329) (Token id:Id.Lit_Chars val:'\t\t{\n' span_id:330) (Token id:Id.Lit_Chars val:'\t\t\tif ( PART == 1 )\n' span_id:331) (Token id:Id.Lit_Chars val:'\t\t\t{\n' span_id:332) (Token id:Id.Lit_Chars val:'\t\t\t\tHOST=$1\n' span_id:333) (Token id:Id.Lit_Chars val:'\t\t\t\tHA=$3\n' span_id:334) (Token id:Id.Lit_Chars val:'\t\t\t\tIP=$4\n' span_id:335) (Token id:Id.Lit_Chars val:'\t\t\t\tBF=$5\n' span_id:336) (Token id: Id.Lit_Chars val: '\t\t\t\tprintf "%s:\\\\\\n\\t:tc=.default:\\\\\\n\\t:ha=0x%s:\\\\\\n\\t:ip=%s:\\\\\\n\\t:bf=%s:\\n", HOST, HA, IP, BF\n' span_id: 337 ) (Token id:Id.Lit_Chars val:'\t\t\t}\n' span_id:338) (Token id:Id.Lit_Chars val:'\t\t}' span_id:339) ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:342) fd: -1 arg_word: {($ Id.VSub_DollarName '$NEWTAB')} ) ] ) ] negated: F ) (command.ControlFlow token:(Token id:Id.ControlFlow_Exit val:exit span_id:347) arg_word:{(0)}) ] )