(command.CommandList
  children: [
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {(DQ ($ Id.VSub_Pound '#'))}
                        {<Id.KW_Bang '!'> <Id.Lit_Equals '='>}
                        {(DQ <1>)}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [
                {<echo>}
                {
                  (DQ <'Usage: '> 
                    (CommandSub
                      left_token: <Id.Left_Backtick '`'>
                      child: 
                        (command.Simple
                          blame_tok: <basename>
                          more_env: []
                          words: [{<basename>} {($ Id.VSub_Number 0)}]
                          redirects: []
                          do_fork: T
                        )
                      right: <Id.Backtick_Right '`'>
                    ) <' \'character\''>
                  )
                }
              ]
              redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [48 66]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Pipeline
                      children: [
                        (command.Simple
                          blame_tok: <echo>
                          more_env: []
                          words: [{<echo>} {($ Id.VSub_DollarName LANG)}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <grep>
                          more_env: []
                          words: [{<grep>} {<-qi>} {(SQ <'UTF.*8'>)}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_Pipe _>]
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'lang='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'lang='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'lang='> name:lang)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (command.Simple
                                blame_tok: <echo>
                                more_env: []
                                words: [{<echo>} {($ Id.VSub_DollarName LANG)}]
                                redirects: []
                                do_fork: T
                              )
                              (command.Simple
                                blame_tok: <sed>
                                more_env: []
                                words: [{<sed>} {(SQ <'s/\\(.._..\\).*/\\1/'>)}]
                                redirects: []
                                do_fork: T
                              )
                            ]
                            ops: [<Id.Op_Pipe _>]
                          )
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'codeset='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'codeset='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'codeset='> name:codeset)
                  op: assign_op.Equal
                  rhs: {<UTF-8>}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'character='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'character='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'character='> name:character)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number 1))}
                )
              ]
              redirects: []
            )
          ]
          spids: [94 111]
        )
      ]
      else_kw: <Id.KW_Else else>
      else_action: [
        (command.Simple
          blame_tok: <echo>
          more_env: []
          words: [{<echo>} {(DQ <'Sorry, only UTF-8 is supported at present'>)}]
          redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
          do_fork: T
        )
        (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})
      ]
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'dir='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'dir='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'dir='> name:dir)
          op: assign_op.Equal
          rhs: {<'/usr/share/X11/locale'>}
        )
      ]
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {<Id.KW_Bang '!'>}
                        {<-d>}
                        {(DQ ($ Id.VSub_DollarName dir))}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'dir='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'dir='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'dir='> name:dir)
                  op: assign_op.Equal
                  rhs: {<'/usr/X11R6/lib/X11/locale'>}
                )
              ]
              redirects: []
            )
          ]
          spids: [181 196]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {<Id.KW_Bang '!'>}
                        {<-f>}
                        {(DQ ($ Id.VSub_DollarName dir) <'/locale.dir'>)}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'Sorry, couldn\'t find your X windows locale data'>)}]
              redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [207 223]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'dir='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'dir='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'dir='> name:dir)
          op: assign_op.Equal
          rhs: 
            {
              (DQ ($ Id.VSub_DollarName dir) <'/'> 
                (CommandSub
                  left_token: <Id.Left_Backtick '`'>
                  child: 
                    (command.Simple
                      blame_tok: <sed>
                      more_env: []
                      words: [
                        {<sed>}
                        {<-n>}
                        {
                          (DQ <'s#'> <Id.Lit_BadBackslash '\\'> <'([^/]*'> <Id.Lit_BadBackslash '\\'> 
                            <')/.*:.*'> ($ Id.VSub_DollarName lang) <.> ($ Id.VSub_DollarName codeset) <'#'> <Id.Lit_BadBackslash '\\'> <'1#p'>
                          )
                        }
                      ]
                      redirects: [
                        (Redir
                          op: <Id.Redir_Less '<'>
                          loc: (redir_loc.Fd fd:0)
                          arg: {($ Id.VSub_DollarName dir) <'/locale.dir'>}
                        )
                      ]
                      do_fork: T
                    )
                  right: <Id.Backtick_Right '`'>
                )
              )
            }
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <grep>
      more_env: [(EnvPair left:<Id.Lit_VarLike 'LANG='> name:LANG val:{<C>})]
      words: [
        {<grep>}
        {<-F>}
        {
          (DQ (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') 
            ($ Id.VSub_DollarName character) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"')
          )
        }
        {($ Id.VSub_DollarName dir) <'/Compose'>}
      ]
      redirects: []
      do_fork: T
    )
  ]
)