(command.CommandList children: [ (command.ShFunction name: find_sbin_cmd body: (command.BraceGroup children: [ (command.ForEach iter_name: base iter_words: [{(/)} {(/usr/)} {(/usr/local)}] do_arg_iter: F body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(-e)} {($ Id.VSub_DollarName '$base') (/sbin/) ($ Id.VSub_Number '$1')} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:71) ) ] action: [ (C {(echo)} {($ Id.VSub_DollarName '$base') (/sbin/) ($ Id.VSub_Number '$1')} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:83) ) ] spids: [60 73] ) ] ) ] ) ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FDISK) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:94) command_list: (command.CommandList children: [ (command.Simple words: [{(which)} {(fdisk)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:101) fd: 2 arg_word: {(/dev/null)} ) ] ) ] ) ) } spids: [93] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LSUSB) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:106) command_list: (command.CommandList children: [ (command.Simple words: [{(which)} {(lsusb)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:113) fd: 2 arg_word: {(/dev/null)} ) ] ) ] ) ) } spids: [105] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LSPCI) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:118) command_list: (command.CommandList children: [ (command.Simple words: [{(which)} {(lspci)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:125) fd: 2 arg_word: {(/dev/null)} ) ] ) ] ) ) } spids: [117] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(-z)} {(DQ ($ Id.VSub_DollarName '$FDISK'))} {(Id.Lit_RBracket ']')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FDISK) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:142) command_list: (command.CommandList children:[(C {(find_sbin_cmd)} {(fdisk)})]) ) } spids: [141] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(-z)} {(DQ ($ Id.VSub_DollarName '$LSUSB'))} {(Id.Lit_RBracket ']')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LSUSB) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:163) command_list: (command.CommandList children:[(C {(find_sbin_cmd)} {(lsusb)})]) ) } spids: [162] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(-z)} {(DQ ($ Id.VSub_DollarName '$LSPCI'))} {(Id.Lit_RBracket ']')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LSPCI) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:184) command_list: (command.CommandList children:[(C {(find_sbin_cmd)} {(lspci)})]) ) } spids: [183] ) ] ) ] ) (C {(echo)} {(DQ ('============= Drives ============='))}) (command.Pipeline children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Simple words: [ {(sed)} {(-n)} {(SQ (Token id:Id.Lit_Chars val:'s/.* \\([hs]d[a-f]$\\)/\\1/p' span_id:206))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Less val:'<' span_id:209) fd: -1 arg_word: {(/proc/partitions)} ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(-e)} {(/dev/cdrom)} {(Id.Lit_RBracket ']')}) (command.Pipeline children: [(C {(readlink)} {(-f)} {(/dev/cdrom)}) (C {(cut)} {(-d/)} {(-f3)})] negated: F ) ] ) ] ) ) (C {(sort)}) (C {(uniq)}) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:249) cond: [ (command.Sentence child: (C {(read)} {(disk)}) terminator: (Token id:Id.Op_Semi val:';' span_id:254) ) ] body: (command.DoGroup children: [ (C {(echo)} {(-n)} {(DQ (/dev/) ($ Id.VSub_DollarName '$disk') (': '))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-r)} {(/dev/) ($ Id.VSub_DollarName '$disk')} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:282) ) ] action: [(C {(echo)} {(DQ ('permission denied'))})] spids: [270 284] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:size) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:301) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {($ Id.VSub_DollarName '$FDISK')} {(-l)} {(/dev/) ($ Id.VSub_DollarName '$disk')} ) (C {(grep)} {(Disk)}) (C {(cut)} {(-d) (SQ (Token id:Id.Lit_Chars val:' ' span_id:323))} {(-f3-4)} ) (C {(tr)} {(-d)} {(Id.Lit_Comma ',')}) ] negated: F ) ] ) ) } spids: [300] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:rest) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:339) command_list: (command.CommandList children: [ (command.Pipeline children: [ (command.Simple words: [ {(/sbin/hdparm)} {(-i)} {(/dev/) ($ Id.VSub_DollarName '$disk')} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:349) fd: 2 arg_word: {(/dev/null)} ) ] ) (C {(grep)} {(Model)}) ] negated: F ) ] ) ) } spids: [338] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:rest) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:361) command_list: (command.CommandList children: [(C {(echo)} {($ Id.VSub_DollarName '$rest')})] ) ) } spids: [360] ) ] ) (C {(echo)} {(-n)} {(DQ ($ Id.VSub_DollarName '$rest'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} {(DQ ($ Id.VSub_DollarName '$size'))} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:395) ) ] action: [(C {(echo)} {(DQ (', Size=') ($ Id.VSub_DollarName '$size'))})] spids: [382 397] ) ] else_action: [(C {(echo)})] ) ] ) ] ) ) ] negated: F ) (C {(echo)} {(DQ ('============= CPUs ============='))}) (C {(grep)} {(DQ ('model name'))} {(/proc/cpuinfo)}) (C {(echo)} {(DQ ('============= MEM ============='))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:KiB) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:460) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(grep)} {(MemTotal)} {(/proc/meminfo)}) (C {(tr)} {(-s)} {(SQ (Token id:Id.Lit_Chars val:' ' span_id:476))}) (C {(cut)} {(-d) (SQ (Token id:Id.Lit_Chars val:' ' span_id:485))} {(-f2)}) ] negated: F ) ] ) ) } spids: [459] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MiB) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:492) command_list: (command.CommandList children: [(C {(expr)} {($ Id.VSub_DollarName '$KiB')} {(/)} {(1024)})] ) ) } spids: [491] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:round) op: assign_op.Equal rhs: {(32)} spids: [513] ) ] ) (C {(echo)} { (DQ (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:519) command_list: (command.CommandList children: [ (C {(expr)} { (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\(' span_id:534) ) } {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\(' span_id:536))} {($ Id.VSub_DollarName '$MiB')} {(/)} {($ Id.VSub_DollarName '$round')} { (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\)' span_id:544) ) } {(Id.Lit_Other '+')} {(1)} { (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\)' span_id:550) ) } {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\*' span_id:552))} {($ Id.VSub_DollarName '$round')} ) ] ) ) (' MiB') ) } ) (C {(echo)} {(DQ ('============= PCI ============='))}) (C {($ Id.VSub_DollarName '$LSPCI')} {(-tv)}) (C {(echo)} {(DQ ('============= USB ============='))}) (C {($ Id.VSub_DollarName '$LSUSB')}) ] )