(command.CommandList children: [ (command.FuncDef name: cleanExit body: (command.BraceGroup children: [ (C {(rm)} {(-f)} {(${ VSub_Name choices)}) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: { (word_part.BracedVarSub token: <VSub_Number 1> suffix_op: (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)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:choices spids:[143]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name TMP> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonHyphen arg_word: {(Lit_Slash /) (tmp)} ) spids: [144 149] ) (/_spkrtest_choices.) ($ VSub_Dollar '$$') } spids: [143] ) ] spids: [143] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:speaker spids:[153]) op: Equal rhs: {(/dev/speaker)} spids: [153] ) ] spids: [153] ) (C {(test)} {(-w)} {(${ VSub_Name speaker)}) (command.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_DollarName '$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: [16777215 177] ) ] spids: [16777215 205] ) (command.AndOr ops: [Op_DPipe] children: [ (command.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.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(${ VSub_Name choices)})] ) (C {(cleanExit)} {(0)}) ] ) (C {(echo)} {(DQ )}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tunes spids:[332]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(cat)} {(${ VSub_Name choices)}) (C {(tr)} {(-d)} {(SQ <'\\"'>)}) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [334 350] ) ) } spids: [332] ) ] spids: [332] ) (command.ForEach iter_name: tune iter_words: [ { (word_part.BracedVarSub token: <VSub_Name tunes> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{(DEFAULT)}) spids: [359 363] ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.Case to_match: { (word_part.BracedVarSub token: <VSub_Name tune> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{(NULL)}) spids: [370 374] ) } arms: [ (case_arm pat_list: [{(DEFAULT)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:title spids:[383]) op: Equal rhs: {(DQ ('(default melody)'))} spids: [383] ) ] spids: [383] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:music spids:[389]) op: Equal rhs: {(DQ (ec))} spids: [389] ) ] spids: [389] ) ] spids: [379 380 395 16777215] ) (case_arm pat_list: [{(reveille)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:title spids:[402]) op: Equal rhs: {(DQ (Reveille))} spids: [402] ) ] spids: [402] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:music spids:[408]) 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 16777215] ) (case_arm pat_list: [{(contact)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:title spids:[421]) op: Equal rhs: {(DQ ('Contact theme from Close Encounters'))} spids: [421] ) ] spids: [421] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:music spids:[427]) op: Equal rhs: {(DQ ('<cd<a#~<a#>f'))} spids: [427] ) ] spids: [427] ) ] spids: [417 418 433 16777215] ) (case_arm pat_list: [{(dance)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:title spids:[440]) op: Equal rhs: {(DQ ('Lord of the Dance (aka Simple Gifts)'))} spids: [440] ) ] spids: [440] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:music spids:[446]) 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 16777215] ) (case_arm pat_list: [{(loony)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:title spids:[459]) op: Equal rhs: {(DQ ('Loony Toons theme'))} spids: [459] ) ] spids: [459] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:music spids:[465]) op: Equal rhs: {(DQ ('t255cf8f8edc<a>~cf8f8edd#e~ce8cdce8cd.<a>c8c8c#def8af8'))} spids: [465] ) ] spids: [465] ) ] spids: [455 456 471 16777215] ) (case_arm pat_list: [{(sinister)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:title spids:[478]) op: Equal rhs: {(DQ ("standard villain's entrance music"))} spids: [478] ) ] spids: [478] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:music spids:[484]) op: Equal rhs: {(DQ ('mst200o2ola.l8bc.~a.~>l2d#'))} spids: [484] ) ] spids: [484] ) ] spids: [474 475 490 16777215] ) (case_arm pat_list: [{(rightstuff)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:title spids:[497]) op: Equal rhs: {(DQ ("a trope from 'The Right Stuff' score by Bill Conti"))} spids: [497] ) ] spids: [497] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:music spids:[503]) op: Equal rhs: {(DQ ('olcega.a8f>cd2bgc.c8dee2'))} spids: [503] ) ] spids: [503] ) ] spids: [493 494 509 16777215] ) (case_arm pat_list: [{(toccata)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:title spids:[516]) op: Equal rhs: {(DQ ("opening bars of Bach's Toccata and Fugue in D Minor"))} spids: [516] ) ] spids: [516] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:music spids:[522]) op: Equal rhs: {(DQ ('msl16oldcd4mll8pcb-agf+4.g4p4<msl16dcd4mll8pa.a+f+4p16g4'))} spids: [522] ) ] spids: [522] ) ] spids: [512 513 528 16777215] ) (case_arm pat_list: [{(startrek)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:title spids:[535]) op: Equal rhs: {(DQ ('opening bars of the theme from Star Trek Classic'))} spids: [535] ) ] spids: [535] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:music spids:[541]) op: Equal rhs: {(DQ ('l2b.f+.p16a.c+.p l4mn<b.>e8a2mspg+e8c+f+8b2'))} spids: [541] ) ] spids: [541] ) ] spids: [531 532 547 16777215] ) ] spids: [368 376 550] ) (C {(echo)} {(DQ ('Title: ') (${ VSub_Name title))}) (command.SimpleCommand words: [{(echo)} {(${ VSub_Name music)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(${ VSub_Name speaker)} ) ] ) (C {(sleep)} {(1)}) ] spids: [365 580] ) spids: [358 16777215] ) (C {(cleanExit)} {(0)}) ] )