(CommandList children: [ (FuncDef name: cleanExit body: (BraceGroup children: [ (C {(rm)} {(-f)} {(${ VSub_Name choices)}) (C {(exit)} { (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(0)}) spids: [114 118] ) } ) ] spids: [100] ) spids: [96 99] ) (C {(trap)} {(SQ <'cleanExit 1'>)} {(1)} {(2)} {(3)} {(5)} {(15)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:choices) op: Equal rhs: { (BracedVarSub token: <VSub_Name TMP> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(Lit_Slash /) (tmp)}) spids: [144 149] ) (/_spkrtest_choices.) ($ VSub_Dollar '$$') } spids: [143] ) ] spids: [143] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:speaker) op:Equal rhs:{(/dev/speaker)} spids:[153])] spids: [153] ) (C {(test)} {(-w)} {(${ VSub_Name speaker)}) (If arms: [ (if_arm cond: [(C {(Lit_Other '[')} {($ VSub_QMark '$?')} {(-ne)} {(0)} {(Lit_Other ']')})] action: [ (C {(echo)} { (DQ ('You have no write access to ') ($ VSub_Name '$speaker') (' or the speaker device is') ) } ) (C {(echo)} {(DQ ('not enabled in kernel. Cannot play any melody! See spkr(4).'))}) (C {(sleep)} {(2)}) (C {(cleanExit)} {(1)}) ] spids: [-1 177] ) ] spids: [-1 205] ) (AndOr children: [ (SimpleCommand words: [ {(/usr/bin/dialog)} {(--title)} {(DQ ('Speaker test'))} {(--checklist)} {(DQ ('Please select the melodies you wish to play (space for select)'))} {(0)} {(0)} {(0)} {(reveille)} {(DQ (Reveille))} {(OFF)} {(contact)} {(DQ ('Contact theme from Close Encounters'))} {(OFF)} {(dance)} {(DQ ('Lord of the Dance (aka Simple Gifts)'))} {(OFF)} {(loony)} {(DQ ('Loony Toons theme'))} {(OFF)} {(sinister)} {(DQ ("Standard villain's entrance music"))} {(OFF)} {(rightstuff)} {(DQ ("A trope from 'The Right Stuff' score by Bill Conti"))} {(OFF)} {(toccata)} {(DQ ("Opening bars of Bach's Toccata and Fugue in D Minor"))} {(OFF)} {(startrek)} {(DQ ('Opening bars of the theme from Star Trek Classic'))} {(OFF)} ] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(${ VSub_Name choices)} spids:[314])] ) (C {(cleanExit)} {(0)}) ] op_id: Op_DPipe ) (C {(echo)} {(DQ )}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tunes) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(cat)} {(${ VSub_Name choices)}) (C {(tr)} {(-d)} {(SQ <'\\"'>)}) ] negated: False ) ] ) left_token: <Left_Backtick '`'> spids: [334 350] ) ) } spids: [332] ) ] spids: [332] ) (ForEach iter_name: tune iter_words: [ { (BracedVarSub token: <VSub_Name tunes> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DEFAULT)}) spids: [359 363] ) } ] do_arg_iter: False body: (DoGroup children: [ (Case to_match: { (BracedVarSub token: <VSub_Name tune> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(NULL)}) spids: [370 374] ) } arms: [ (case_arm pat_list: [{(DEFAULT)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:title) op: Equal rhs: {(DQ ('(default melody)'))} spids: [383] ) ] spids: [383] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:music) op: Equal rhs: {(DQ (ec))} spids: [389] ) ] spids: [389] ) ] spids: [379 380 395 -1] ) (case_arm pat_list: [{(reveille)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:title) op: Equal rhs: {(DQ (Reveille))} spids: [402] ) ] spids: [402] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:music) op: Equal rhs: { (DQ ( 't255l8c.f.afc~c.f.afc~c.f.afc.f.a..f.~c.f.afc~c.f.afc~c.f.afc~c.f..' ) ) } spids: [408] ) ] spids: [408] ) ] spids: [398 399 414 -1] ) (case_arm pat_list: [{(contact)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:title) op: Equal rhs: {(DQ ('Contact theme from Close Encounters'))} spids: [421] ) ] spids: [421] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:music) op: Equal rhs: {(DQ ('<cd<a#~<a#>f'))} spids: [427] ) ] spids: [427] ) ] spids: [417 418 433 -1] ) (case_arm pat_list: [{(dance)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:title) op: Equal rhs: {(DQ ('Lord of the Dance (aka Simple Gifts)'))} spids: [440] ) ] spids: [440] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:music) op: Equal rhs: { (DQ ( 't240<cfcfgagaa#b#>dc<a#a.~fg.gaa#.agagegc.~cfcfgagaa#b#>dc<a#a.~fg.gga.agfgfgf.' ) ) } spids: [446] ) ] spids: [446] ) ] spids: [436 437 452 -1] ) (case_arm pat_list: [{(loony)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:title) op: Equal rhs: {(DQ ('Loony Toons theme'))} spids: [459] ) ] spids: [459] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:music) op: Equal rhs: {(DQ ('t255cf8f8edc<a>~cf8f8edd#e~ce8cdce8cd.<a>c8c8c#def8af8'))} spids: [465] ) ] spids: [465] ) ] spids: [455 456 471 -1] ) (case_arm pat_list: [{(sinister)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:title) op: Equal rhs: {(DQ ("standard villain's entrance music"))} spids: [478] ) ] spids: [478] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:music) op: Equal rhs: {(DQ ('mst200o2ola.l8bc.~a.~>l2d#'))} spids: [484] ) ] spids: [484] ) ] spids: [474 475 490 -1] ) (case_arm pat_list: [{(rightstuff)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:title) op: Equal rhs: {(DQ ("a trope from 'The Right Stuff' score by Bill Conti"))} spids: [497] ) ] spids: [497] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:music) op: Equal rhs: {(DQ ('olcega.a8f>cd2bgc.c8dee2'))} spids: [503] ) ] spids: [503] ) ] spids: [493 494 509 -1] ) (case_arm pat_list: [{(toccata)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:title) op: Equal rhs: {(DQ ("opening bars of Bach's Toccata and Fugue in D Minor"))} spids: [516] ) ] spids: [516] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:music) op: Equal rhs: {(DQ ('msl16oldcd4mll8pcb-agf+4.g4p4<msl16dcd4mll8pa.a+f+4p16g4'))} spids: [522] ) ] spids: [522] ) ] spids: [512 513 528 -1] ) (case_arm pat_list: [{(startrek)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:title) op: Equal rhs: {(DQ ('opening bars of the theme from Star Trek Classic'))} spids: [535] ) ] spids: [535] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:music) op: Equal rhs: {(DQ ('l2b.f+.p16a.c+.p l4mn<b.>e8a2mspg+e8c+f+8b2'))} spids: [541] ) ] spids: [541] ) ] spids: [531 532 547 -1] ) ] spids: [368 376 550] ) (C {(echo)} {(DQ ('Title: ') (${ VSub_Name title))}) (SimpleCommand words: [{(echo)} {(${ VSub_Name music)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(${ VSub_Name speaker)} spids: [569] ) ] ) (C {(sleep)} {(1)}) ] spids: [365 580] ) spids: [358 -1] ) (C {(cleanExit)} {(0)}) ] )