(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {($ Id.VSub_Pound '$#')} {(-eq)} {(0)} {(Id.Lit_RBracket ']')})
              terminator: (Token id:Id.Op_Semi val:';' span_id:29)
            )
          ]
          action: [
            (C {(echo)} 
              {
                (DQ ('Usage: ') 
                  (command_sub
                    left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:38)
                    command_list: 
                      (command.CommandList
                        children: [(C {(basename)} {($ Id.VSub_Number '$0')})]
                      )
                  ) (' amount currency to currency')
                )
              }
            )
            (C {(echo)} {(DQ ('Most common currencies are CAD, CNY, EUR, USD, INR, JPY, and MXN'))})
            (C {(echo)} 
              {
                (DQ ('Use ') 
                  (word_part.EscapedLiteral
                    token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:58)
                  ) 
                  (command_sub
                    left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:59)
                    command_list: 
                      (command.CommandList
                        children: [(C {(basename)} {($ Id.VSub_Number '$0')})]
                      )
                  ) (' list') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:65)) 
                  (' for the full list of supported currencies')
                )
              }
            )
          ]
          spids: [18 31]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} 
                  {
                    (command_sub
                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:76)
                      command_list: (command.CommandList children:[(C {(uname)})])
                    )
                  } {(Id.Lit_Equals '=')} {(DQ (Darwin))} {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:87)
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:LANG)
                  op: assign_op.Equal
                  rhs: {(C)}
                  spids: [92]
                )
              ]
            )
          ]
          spids: [72 89]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:url)
          op: assign_op.Equal
          rhs: {(DQ ('https://www.google.com/finance/converter'))}
          spids: [101]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:tempfile)
          op: assign_op.Equal
          rhs: {(DQ (/tmp/converter.) ($ Id.VSub_Dollar '$$'))}
          spids: [106]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:lynx)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:114)
                command_list: (command.CommandList children:[(C {(which)} {(lynx)})])
              )
            }
          spids: [113]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:currencies)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:126)
                command_list: 
                  (command.CommandList
                    children: [
                      (command.Pipeline
                        children: [
                          (C {($ Id.VSub_DollarName '$lynx')} {(-source)} 
                            {(DQ ($ Id.VSub_DollarName '$url'))}
                          )
                          (C {(grep)} {(DQ ('option  value='))})
                          (C {(cut)} 
                            {(-d) 
                              (word_part.EscapedLiteral
                                token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:150)
                              )
                            } {(-f2-)}
                          )
                          (C {(sed)} {(SQ (Token id:Id.Lit_Chars val:'s/">/ /' span_id:159))})
                          (C {(cut)} 
                            {(-d) 
                              (word_part.EscapedLiteral
                                token: (Token id:Id.Lit_EscapedChar val:'\\(' span_id:167)
                              )
                            } {(-f1)}
                          )
                          (C {(sort)})
                          (C {(uniq)})
                        ]
                        negated: F
                      )
                    ]
                  )
              )
            }
          spids: [125]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {($ Id.VSub_Pound '$#')} {(-ne)} {(4)} {(Id.Lit_RBracket ']')})
              terminator: (Token id:Id.Op_Semi val:';' span_id:197)
            )
          ]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_Number '$1'))} {(Id.Lit_Equals '=')} 
                          {(DQ (list))} {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:218)
                    )
                  ]
                  action: [
                    (C {(echo)} {(DQ ('List of supported currencies:'))})
                    (C {(echo)} {(DQ ($ Id.VSub_DollarName '$currencies'))})
                  ]
                  spids: [202 220]
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:244)
              arg_word: {(0)}
            )
          ]
          spids: [185 199]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {($ Id.VSub_Number '$3')} 
                  {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(DQ (to))} {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:270)
            )
          ]
          action: [
            (C {(echo)} 
              {
                (DQ ('Usage: ') 
                  (command_sub
                    left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:279)
                    command_list: 
                      (command.CommandList
                        children: [(C {(basename)} {($ Id.VSub_Number '$0')})]
                      )
                  ) (' value currency TO currency')
                )
              }
            )
            (C {(echo)} 
              {
                (DQ ('(use ') 
                  (word_part.EscapedLiteral
                    token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:292)
                  ) 
                  (command_sub
                    left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:293)
                    command_list: 
                      (command.CommandList
                        children: [(C {(basename)} {($ Id.VSub_Number '$0')})]
                      )
                  ) (' list') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:299)) 
                  (' to get a list of all currency values)')
                )
              }
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:304)
              arg_word: {(0)}
            )
          ]
          spids: [255 272]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:amount)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number '$1')}
          spids: [311]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:basecurrency)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:316)
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.Pipeline
                          children: [
                            (C {(echo)} {($ Id.VSub_Number '$2')})
                            (C {(tr)} {(SQ (Token id:Id.Lit_Chars val:'[:lower:]' span_id:326))} 
                              {(SQ (Token id:Id.Lit_Chars val:'[:upper:]' span_id:330))}
                            )
                          ]
                          negated: F
                        )
                      ]
                    )
                )
              )
            }
          spids: [314]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:targetcurrency)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:337)
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.Pipeline
                          children: [
                            (C {(echo)} {($ Id.VSub_Number '$4')})
                            (C {(tr)} {(SQ (Token id:Id.Lit_Chars val:'[:lower:]' span_id:347))} 
                              {(SQ (Token id:Id.Lit_Chars val:'[:upper:]' span_id:351))}
                            )
                          ]
                          negated: F
                        )
                      ]
                    )
                )
              )
            }
          spids: [335]
        )
      ]
    )
    (command.Pipeline
      children: [
        (C {($ Id.VSub_DollarName '$lynx')} {(-source)} 
          {
            (DQ ($ Id.VSub_DollarName '$url') ('?a=') ($ Id.VSub_DollarName '$amount') ('&from=') 
              ($ Id.VSub_DollarName '$basecurrency') ('&to=') ($ Id.VSub_DollarName '$targetcurrency')
            )
          }
        )
        (C {(grep)} {(SQ (Token id:Id.Lit_Chars val:'id=currency_converter_result' span_id:382))})
        (C {(sed)} {(SQ (Token id:Id.Lit_Chars val:'s/<[^>]*>//g' span_id:390))})
      ]
      negated: F
    )
    (command.ControlFlow token:(Token id:Id.ControlFlow_Exit val:exit span_id:394) arg_word:{(0)})
  ]
)