(command.CommandList children: [ (C {<set>} {<-e>}) (C {<.>} {($ Id.VSub_DollarName '$REPO_ROOT') <'/bootstrap/shared/shared_functions.sh'>}) (command.ShFunction name: remove_DHCPservers body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'network_name='> (braced_var_sub token: <Id.VSub_Number 1> suffix_op: (suffix_op.Unary tok:<Id.VTest_Hyphen -> arg_word:{}) ) } ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_z child: {(DQ ($ Id.VSub_DollarName '$network_name'))} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<local>} {<Id.Lit_VarLike 'vms='> (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<VBoxManage>} {<list>} {<vms>}) (C {<sed>} {(SQ <'s/^.*{\\([0-9a-f-]*\\)}/\\1/'>)}) ] negated: F ) ) } ) (C {<local>} {<Id.Lit_VarLike 'vm_networks='> (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (command.ForEach iter_name: vm iter_words: [{($ Id.VSub_DollarName '$vms')}] do_arg_iter: F body: (command.DoGroup children: [ (command.Sentence child: (command.Pipeline children: [ (C {<VBoxManage>} {<showvminfo>} {<--details>} {<--machinereadable>} {($ Id.VSub_DollarName '$vm')} ) (C {<grep>} {<-i>} {(SQ <'^hostonlyadapter[2-9]='>)}) (C {<sed>} {<-e>} {(SQ <'s/^.*=//'>)} {<-e>} {(SQ <'s/"//g'>)} ) ] negated: F ) terminator: <Id.Op_Semi _> ) ] ) ) (C {<sort>} {<-u>}) ] negated: F ) ) } ) (C {<local>} {<Id.Lit_VarLike 'existing_nets_reg_ex='> (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Simple words: [ {<sed>} {<-e>} {(SQ <'s/^/^/'>)} {<-e>} {(SQ <'s/$/$/'>)} {<-e>} {(SQ <'s/ /$|^/g'>)} ] redirects: [ (redir op: <Id.Redir_TLess '<<<'> loc: (redir_loc.Fd fd:0) arg: {(DQ ($ Id.VSub_DollarName '$vm_networks'))} ) ] do_fork: T ) ) } ) (command.Pipeline children: [ (C {<VBoxManage>} {<list>} {<dhcpservers>}) (C {<grep>} {<-E>} { (DQ <'^NetworkName:'> <Id.Lit_BadBackslash '\\'> <'s+HostInterfaceNetworking'> ) } ) (C {<awk>} {(SQ <'{print $2}'>)}) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (C {<read>} {<-r>} {<network_name>}) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {($ Id.VSub_DollarName '$existing_nets_reg_ex')} ) ) (command.Pipeline children: [ (command.Simple words: [ {<egrep>} {<-q>} {(DQ ($ Id.VSub_DollarName '$existing_nets_reg_ex'))} ] redirects: [ (redir op: <Id.Redir_TLess '<<<'> loc: (redir_loc.Fd fd:0) arg: {($ Id.VSub_DollarName '$network_name')} ) ] do_fork: T ) ] negated: T ) (command.ControlFlow token: <Id.ControlFlow_Continue continue> ) ] ) (C {<remove_DHCPservers>} {($ Id.VSub_DollarName '$network_name')}) ] ) ) ] negated: F ) ] spids: [54 67] ) ] else_action: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DPipe] children: [ (C {<VBoxManage>} {<dhcpserver>} {<remove>} {<--netname>} {(DQ ($ Id.VSub_DollarName '$network_name'))} ) (C {<local>} {<Id.Lit_VarLike 'return='> <0>}) (C {<local>} {<Id.Lit_VarLike 'return='> ($ Id.VSub_QMark '$?')}) ] ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {($ Id.VSub_DollarName '$return')} ) ] ) ] ) ) (command.ShFunction name: create_vagrant_vms body: (BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<cd>} {($ Id.VSub_DollarName '$REPO_ROOT') <'/bootstrap/vagrant_scripts'>}) (C {<vagrant>} {<up>}) ] ) ] ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: { (DQ (braced_var_sub token: <Id.VSub_Name BASH_SOURCE> bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>}) ) ) } right: {(DQ (${ Id.VSub_Number 0))} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<remove_DHCPservers>}) (C {<create_vagrant_vms>})] spids: [355 379] ) ] ) ] )