(CommandList children: [ (FuncDef name: find_sbin_cmd body: (BraceGroup children: [ (ForEach iter_name: base iter_words: [{(/)} {(/usr/)} {(/usr/local)}] do_arg_iter: False body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-e)} {($ VSub_Name '$base') (/sbin/) ($ VSub_Number '$1')} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {($ VSub_Name '$base') (/sbin/) ($ VSub_Number '$1')}) (C {(exit)}) ] spids: [16777215 73] ) ] spids: [16777215 86] ) ] spids: [57 89] ) spids: [49 55] ) ] spids: [41] ) spids: [37 40] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FDISK) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [{(which)} {(fdisk)}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[99])] ) ] ) left_token: <Left_Backtick '`'> spids: [94 101] ) } spids: [93] ) ] spids: [93] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LSUSB) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [{(which)} {(lsusb)}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[109])] ) ] ) left_token: <Left_Backtick '`'> spids: [104 111] ) } spids: [103] ) ] spids: [103] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LSPCI) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [{(which)} {(lspci)}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[119])] ) ] ) left_token: <Left_Backtick '`'> spids: [114 121] ) } spids: [113] ) ] spids: [113] ) (AndOr children: [ (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$FDISK'))} {(Lit_Other ']')}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FDISK) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(find_sbin_cmd)} {(fdisk)})]) left_token: <Left_Backtick '`'> spids: [136 140] ) } spids: [135] ) ] spids: [135] ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$LSUSB'))} {(Lit_Other ']')}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LSUSB) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(find_sbin_cmd)} {(lsusb)})]) left_token: <Left_Backtick '`'> spids: [155 159] ) } spids: [154] ) ] spids: [154] ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$LSPCI'))} {(Lit_Other ']')}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LSPCI) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(find_sbin_cmd)} {(lspci)})]) left_token: <Left_Backtick '`'> spids: [174 178] ) } spids: [173] ) ] spids: [173] ) ] op_id: Op_DAmp ) (C {(echo)} {(DQ ('============= Drives ============='))}) (Pipeline children: [ (Subshell child: (CommandList children: [ (SimpleCommand words: [{(sed)} {(-n)} {(SQ <'s/.* \\([hs]d[a-f]$\\)/\\1/p'>)}] redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(/proc/partitions)} spids: [197] ) ] ) (AndOr children: [ (C {(Lit_Other '[')} {(-e)} {(/dev/cdrom)} {(Lit_Other ']')}) (Pipeline children: [(C {(readlink)} {(-f)} {(/dev/cdrom)}) (C {(cut)} {(-d/)} {(-f3)})] negated: False ) ] op_id: Op_DAmp ) ] ) spids: [187 225] ) (C {(sort)}) (C {(uniq)}) (While cond: [(Sentence child:(C {(read)} {(disk)}) terminator:<Op_Semi ';'>)] body: (DoGroup children: [ (C {(echo)} {(-n)} {(DQ (/dev/) ($ VSub_Name '$disk') (': '))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-r)} {(/dev/) ($ VSub_Name '$disk')} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {(DQ ('permission denied'))})] spids: [16777215 272] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:size) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {($ VSub_Name '$FDISK')} {(-l)} {(/dev/) ($ VSub_Name '$disk')} ) (C {(grep)} {(Disk)}) (C {(cut)} {(-d) (SQ <' '>)} {(-f3-4)}) (C {(tr)} {(-d)} {(Lit_Comma ',')}) ] negated: False ) ] ) left_token: <Left_Backtick '`'> spids: [289 321] ) } spids: [288] ) ] spids: [288] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:rest) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (SimpleCommand words: [ {(/sbin/hdparm)} {(-i)} {(/dev/) ($ VSub_Name '$disk')} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [333] ) ] ) (C {(grep)} {(Model)}) ] negated: False ) ] ) left_token: <Left_Backtick '`'> spids: [325 341] ) } spids: [324] ) ] spids: [324] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:rest) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(echo)} {($ VSub_Name '$rest')})] ) left_token: <Left_Backtick '`'> spids: [345 349] ) } spids: [344] ) ] spids: [344] ) (C {(echo)} {(-n)} {(DQ ($ VSub_Name '$rest'))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$size'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {(DQ (', Size=') ($ VSub_Name '$size'))})] spids: [16777215 379] ) ] else_action: [(C {(echo)})] spids: [390 396] ) ] spids: [285 399] ) ] spids: [244 401] ) ) ] negated: False ) (C {(echo)} {(DQ ('============= CPUs ============='))}) (C {(grep)} {(DQ ('model name'))} {(/proc/cpuinfo)}) (C {(echo)} {(DQ ('============= MEM ============='))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KiB) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(grep)} {(MemTotal)} {(/proc/meminfo)}) (C {(tr)} {(-s)} {(SQ <' '>)}) (C {(cut)} {(-d) (SQ <' '>)} {(-f2)}) ] negated: False ) ] ) left_token: <Left_Backtick '`'> spids: [442 469] ) } spids: [441] ) ] spids: [441] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MiB) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(expr)} {($ VSub_Name '$KiB')} {(/)} {(1024)})] ) left_token: <Left_Backtick '`'> spids: [472 480] ) } spids: [471] ) ] spids: [471] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:round) op:Equal rhs:{(32)} spids:[491])] spids: [491] ) (C {(echo)} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(EscapedLiteralPart token:<Lit_EscapedChar '\\('>)} {(EscapedLiteralPart token:<Lit_EscapedChar '\\('>)} {($ VSub_Name '$MiB')} {(/)} {($ VSub_Name '$round')} {(EscapedLiteralPart token:<Lit_EscapedChar '\\)'>)} {(Lit_Other '+')} {(1)} {(EscapedLiteralPart token:<Lit_EscapedChar '\\)'>)} {(EscapedLiteralPart token:<Lit_EscapedChar '\\*'>)} {($ VSub_Name '$round')} ) ] ) left_token: <Left_Backtick '`'> spids: [497 521] ) (' MiB') ) } ) (C {(echo)} {(DQ ('============= PCI ============='))}) (C {($ VSub_Name '$LSPCI')} {(-tv)}) (C {(echo)} {(DQ ('============= USB ============='))}) (C {($ VSub_Name '$LSUSB')}) ] )