(command.CommandList children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_Pound '$#'))} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(DQ (1))} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:64) ) ] action: [ (command.Simple words: [ {(echo)} { (DQ ('Usage: ') (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:73) command_list: (command.CommandList children: [(C {(basename)} {($ Id.VSub_Number '$0')})] ) ) (" 'character'") ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:83) fd: -1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:87) arg_word: {(1)} ) ] spids: [48 66] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$LANG')}) (C {(grep)} {(-qi)} {(SQ (Token id:Id.Lit_Chars val:'UTF.*8' span_id:107))}) ] negated: F ) terminator: (Token id:Id.Op_Semi val:';' span_id:109) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lang) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:115) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$LANG')}) (C {(sed)} { (SQ (Token id: Id.Lit_Chars val: 's/\\(.._..\\).*/\\1/' span_id: 133 ) ) } ) ] negated: F ) ] ) ) } spids: [114] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:codeset) op: assign_op.Equal rhs: {(UTF-8)} spids: [138] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:character) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [142] ) ] ) ] spids: [94 111] ) ] else_action: [ (command.Simple words: [{(echo)} {(DQ ('Sorry, only UTF-8 is supported at present'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:156) fd: -1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:160) arg_word: {(1)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:dir) op: assign_op.Equal rhs: {(/usr/share/X11/locale)} spids: [175] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-d)} {(DQ ($ Id.VSub_DollarName '$dir'))} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:194) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:dir) op: assign_op.Equal rhs: {(/usr/X11R6/lib/X11/locale)} spids: [199] ) ] ) ] spids: [181 196] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-f)} {(DQ ($ Id.VSub_DollarName '$dir') (/locale.dir))} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:221) ) ] action: [ (command.Simple words: [{(echo)} {(DQ ("Sorry, couldn't find your X windows locale data"))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:232) fd: -1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:236) arg_word: {(1)} ) ] spids: [207 223] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:dir) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$dir') (/) (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:247) command_list: (command.CommandList children: [ (command.Simple words: [ {(sed)} {(-n)} { (DQ ('s#') (Id.Lit_Other '\\') ('([^/]*') (Id.Lit_Other '\\') (')/.*:.*') ($ Id.VSub_DollarName '$lang') (.) ($ Id.VSub_DollarName '$codeset') ('#') (Id.Lit_Other '\\') ('1#p') ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Less val:'<' span_id:278) fd: -1 arg_word: {($ Id.VSub_DollarName '$dir') (/locale.dir)} ) ] ) ] ) ) ) } spids: [243] ) ] ) (command.Simple words: [ {(grep)} {(-F)} { (DQ (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:293)) ($ Id.VSub_DollarName '$character') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:295)) ) } {($ Id.VSub_DollarName '$dir') (/Compose)} ] more_env: [(env_pair name:LANG val:{(C)} spids:[285])] ) ] )