(CommandList children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-eq)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ('Usage: ') (CommandSubPart command_list: (CommandList children:[(C {(basename)} {($ VSub_Number '$0')})]) left_token: <Left_CommandSub '$('> spids: [38 42] ) (' amount currency to currency') ) } ) (C {(echo)} {(DQ ('Most common currencies are CAD, CNY, EUR, USD, INR, JPY, and MXN'))}) (C {(echo)} { (DQ ('Use ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (CommandSubPart command_list: (CommandList children:[(C {(basename)} {($ VSub_Number '$0')})]) left_token: <Left_CommandSub '$('> spids: [59 63] ) (' list') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' for the full list of supported currencies') ) } ) ] spids: [16777215 31] ) ] spids: [16777215 69] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (CommandSubPart command_list: (CommandList children:[(C {(uname)})]) left_token: <Left_CommandSub '$('> spids: [76 78] ) } {(Lit_Other '=')} {(DQ (Darwin))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:LANG) op:Equal rhs:{(C)} spids:[92])] spids: [92] ) ] spids: [16777215 89] ) ] spids: [16777215 98] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ('https://www.google.com/finance/converter'))} spids: [101] ) ] spids: [101] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tempfile) op: Equal rhs: {(DQ (/tmp/converter.) ($ VSub_Dollar '$$'))} spids: [106] ) ] spids: [106] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:lynx) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(which)} {(lynx)})]) left_token: <Left_CommandSub '$('> spids: [114 118] ) } spids: [113] ) ] spids: [113] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:currencies) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {($ VSub_Name '$lynx')} {(-source)} {(DQ ($ VSub_Name '$url'))}) (C {(grep)} {(DQ ('option value='))}) (C {(cut)} {(-d) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>)} {(-f2-)}) (C {(sed)} {(SQ <'s/">/ /'>)}) (C {(cut)} {(-d) (EscapedLiteralPart token:<Lit_EscapedChar '\\('>)} {(-f1)}) (C {(sort)}) (C {(uniq)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [126 178] ) } spids: [125] ) ] spids: [125] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-ne)} {(4)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (list))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ('List of supported currencies:'))}) (C {(echo)} {(DQ ($ VSub_Name '$currencies'))}) ] spids: [16777215 220] ) ] spids: [16777215 241] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] spids: [16777215 199] ) ] spids: [16777215 248] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Number '$3')} {(KW_Bang '!') (Lit_Other '=')} {(DQ (to))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ('Usage: ') (CommandSubPart command_list: (CommandList children:[(C {(basename)} {($ VSub_Number '$0')})]) left_token: <Left_CommandSub '$('> spids: [279 283] ) (' value currency TO currency') ) } ) (C {(echo)} { (DQ ('(use ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (CommandSubPart command_list: (CommandList children:[(C {(basename)} {($ VSub_Number '$0')})]) left_token: <Left_CommandSub '$('> spids: [293 297] ) (' list') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' to get a list of all currency values)') ) } ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] spids: [16777215 272] ) ] spids: [16777215 308] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:amount) op:Equal rhs:{($ VSub_Number '$1')} spids:[311])] spids: [311] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:basecurrency) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Number '$2')}) (C {(tr)} {(SQ <'[:lower:]'>)} {(SQ <'[:upper:]'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [316 332] ) ) } spids: [314] ) ] spids: [314] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:targetcurrency) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Number '$4')}) (C {(tr)} {(SQ <'[:lower:]'>)} {(SQ <'[:upper:]'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [337 353] ) ) } spids: [335] ) ] spids: [335] ) (Pipeline children: [ (C {($ VSub_Name '$lynx')} {(-source)} { (DQ ($ VSub_Name '$url') ('?a=') ($ VSub_Name '$amount') ('&from=') ($ VSub_Name '$basecurrency') ('&to=') ($ VSub_Name '$targetcurrency') ) } ) (C {(grep)} {(SQ <'id=currency_converter_result'>)}) (C {(sed)} {(SQ <'s/<[^>]*>//g'>)}) ] negated: F ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] )