(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ARGV0) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<basename>} {(DQ ($ Id.VSub_Number '$0'))}) ) } spids: [52] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LSB_RELEASE) op: assign_op.Equal rhs: {(SQ <'/etc/lsb-release'>)} spids: [63] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:VERSIONS_SHELLS) op: assign_op.Equal rhs: {(DQ <'ash /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/sh /bin/zsh'>)} spids: [68] ) ] ) (command.CommandList children: [ (command.Sentence child:(C {<true>}) terminator:<Id.Op_Semi _>) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TRUE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [77] ) ] ) ] ) (command.CommandList children: [ (command.Sentence child:(C {<false>}) terminator:<Id.Op_Semi _>) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FALSE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [83] ) ] ) ] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:ERROR) op:assign_op.Equal rhs:{<2>} spids:[86])] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:UNAME_R) op: assign_op.Equal rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<uname>} {<-r>}))} spids: [90] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:UNAME_S) op: assign_op.Equal rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<uname>} {<-s>}))} spids: [99] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:__versions_haveStrings) op: assign_op.Equal rhs: {(${ Id.VSub_Name ERROR)} spids: [109] ) ] ) (command.ShFunction name: versions_osName body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name_) op: assign_op.Equal rhs: {(SQ <unrecognized>)} spids: [122] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_system_) op: assign_op.Equal rhs: {(${ Id.VSub_Name UNAME_S)} spids: [128] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_release_) op: assign_op.Equal rhs: {(${ Id.VSub_Name UNAME_R)} spids: [134] ) ] ) (command.Case to_match: {(${ Id.VSub_Name os_system_)} arms: [ (case_arm pat_list: [{<CYGWIN_NT-> <Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name_) op: assign_op.Equal rhs: {(SQ <Cygwin>)} spids: [153] ) ] ) ] spids: [149 151 158 -1] ) (case_arm pat_list: [{<Darwin>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<'/usr/bin/sw_vers'>} {<-productName>}) ) } spids: [165] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<versions_osVersion>}) ) } spids: [175] ) ] ) (command.Case to_match: {(${ Id.VSub_Name os_version_)} arms: [ (case_arm pat_list: [ {<10.4>} {<10.4.> <Id.Lit_LBracket '['> <0-9> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'>} ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name_) op: assign_op.Equal rhs: {(SQ <'Mac OS X Tiger'>)} spids: [201] ) ] ) ] spids: [192 199 206 -1] ) (case_arm pat_list: [ {<10.5>} {<10.5.> <Id.Lit_LBracket '['> <0-9> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'>} ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name_) op: assign_op.Equal rhs: {(SQ <'Mac OS X Leopard'>)} spids: [218] ) ] ) ] spids: [209 216 223 -1] ) (case_arm pat_list: [ {<10.6>} {<10.6.> <Id.Lit_LBracket '['> <0-9> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'>} ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name_) op: assign_op.Equal rhs: {(SQ <'Mac OS X Snow Leopard'>)} spids: [235] ) ] ) ] spids: [226 233 240 -1] ) (case_arm pat_list: [ {<10.7>} {<10.7.> <Id.Lit_LBracket '['> <0-9> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'>} ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name_) op: assign_op.Equal rhs: {(SQ <'Mac OS X Lion'>)} spids: [252] ) ] ) ] spids: [243 250 257 -1] ) (case_arm pat_list: [ {<10.8>} {<10.8.> <Id.Lit_LBracket '['> <0-9> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'>} ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name_) op: assign_op.Equal rhs: {(SQ <'Mac OS X Mountain Lion'>)} spids: [269] ) ] ) ] spids: [260 267 274 -1] ) (case_arm pat_list: [ {<10.9>} {<10.9.> <Id.Lit_LBracket '['> <0-9> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'>} ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name_) op: assign_op.Equal rhs: {(SQ <'Mac OS X Mavericks'>)} spids: [286] ) ] ) ] spids: [277 284 291 -1] ) (case_arm pat_list: [ {<10.10>} {<10.10.> <Id.Lit_LBracket '['> <0-9> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'> } ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name_) op: assign_op.Equal rhs: {(SQ <'Mac OS X Yosemite'>)} spids: [303] ) ] ) ] spids: [294 301 308 -1] ) (case_arm pat_list: [ {<10.11>} {<10.11.> <Id.Lit_LBracket '['> <0-9> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'> } ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name_) op: assign_op.Equal rhs: {(SQ <'Mac OS X El Capitan'>)} spids: [320] ) ] ) ] spids: [311 318 325 -1] ) (case_arm pat_list: [ {<10.12>} {<10.12.> <Id.Lit_LBracket '['> <0-9> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'> } ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name_) op: assign_op.Equal rhs: {(SQ <'macOS Sierra'>)} spids: [337] ) ] ) ] spids: [328 335 342 -1] ) (case_arm pat_list: [ {<10.13>} {<10.13.> <Id.Lit_LBracket '['> <0-9> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'> } ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name_) op: assign_op.Equal rhs: {(SQ <'macOS High Sierra'>)} spids: [354] ) ] ) ] spids: [345 352 359 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name_) op: assign_op.Equal rhs: {(SQ <macOS>)} spids: [365] ) ] ) ] spids: [362 363 370 -1] ) ] ) ] spids: [161 162 376 -1] ) (case_arm pat_list: [{<FreeBSD>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name_) op: assign_op.Equal rhs: {(SQ <FreeBSD>)} spids: [382] ) ] ) ] spids: [379 380 387 -1] ) (case_arm pat_list: [{<Linux>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name_) op: assign_op.Equal rhs: {(SQ <Linux>)} spids: [393] ) ] ) ] spids: [390 391 398 -1] ) (case_arm pat_list: [{<SunOS>}] action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple words: [{<grep>} {(SQ <OpenSolaris>)} {<'/etc/release'>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name_) op: assign_op.Equal rhs: {(SQ <OpenSolaris>)} spids: [422] ) ] ) ] spids: [405 419] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name_) op: assign_op.Equal rhs: {(SQ <Solaris>)} spids: [431] ) ] ) ] ) ] spids: [401 402 440 -1] ) ] ) (C {<echo>} {(${ Id.VSub_Name os_name_)}) (C {<unset>} {<os_name_>} {<os_system_>} {<os_release_>} {<os_version_>}) ] ) ) (command.ShFunction name: versions_osVersion body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_version_) op: assign_op.Equal rhs: {(SQ <unrecognized>)} spids: [474] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_system_) op: assign_op.Equal rhs: {(${ Id.VSub_Name UNAME_S)} spids: [480] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_release_) op: assign_op.Equal rhs: {(${ Id.VSub_Name UNAME_R)} spids: [486] ) ] ) (command.Case to_match: {(${ Id.VSub_Name os_system_)} arms: [ (case_arm pat_list: [{<CYGWIN_NT-> <Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {(DQ (${ Id.VSub_Name os_release_))} {<Id.Lit_Colon ':'>} {(SQ <'\\([0-9]*\\.[0-9]\\.[0-9]*\\).*'>)} ) ) } spids: [506] ) ] ) ] spids: [501 503 534 -1] ) (case_arm pat_list: [{<Darwin>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<'/usr/bin/sw_vers'>} {<-productVersion>}) ) } spids: [541] ) ] ) ] spids: [537 538 551 -1] ) (case_arm pat_list: [{<FreeBSD>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {(DQ (${ Id.VSub_Name os_release_))} {<Id.Lit_Colon ':'>} {(SQ <'\\([0-9]*\\.[0-9]*\\)-.*'>)} ) ) } spids: [558] ) ] ) ] spids: [554 555 584 -1] ) (case_arm pat_list: [{<Linux>}] action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-r>} {(DQ (${ Id.VSub_Name LSB_RELEASE))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<grep>} {<-q>} {(SQ <'DISTRIB_ID=Ubuntu'>)} {(DQ (${ Id.VSub_Name LSB_RELEASE))} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<cat>} {(DQ (${ Id.VSub_Name LSB_RELEASE))}) (C {<awk>} {<-F> <Id.Lit_Equals '='>} {(SQ <'$1~/DISTRIB_DESCRIPTION/{print $2}'>)} ) (C {<sed>} {(SQ <'s/"//g;s/ /-/g'>)}) ] negated: F ) ) } spids: [633] ) ] ) ] spids: [609 626] ) ] ) ] spids: [591 606] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-r>} {(SQ <'/etc/redhat-release'>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<cat>} {<'/etc/redhat-release'>}) ) } spids: [693] ) ] ) ] spids: [677 690] ) ] ) ] spids: [587 588 706 -1] ) (case_arm pat_list: [{<SunOS>}] action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple words: [{<grep>} {(SQ <OpenSolaris>)} {<'/etc/release'>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<grep>} {(SQ <OpenSolaris>)} {<'/etc/release'>}) (C {<awk>} {(SQ <'{print $2"("$3")"}'>)}) ] negated: F ) ) } spids: [730] ) ] ) ] spids: [713 727] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:major_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {(DQ (${ Id.VSub_Name os_release_))}) (C {<sed>} {(SQ <'s/[0-9]*\\.\\([0-9]*\\)/\\1/'>)}) ] negated: F ) ) } spids: [754] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:minor_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<grep>} {<Solaris>} {<'/etc/release'>}) (C {<sed>} {(SQ <'s/[^u]*\\(u[0-9]*\\).*/\\1/'>)}) ] negated: F ) ) } spids: [783] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_version_) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name major_) (${ Id.VSub_Name minor_))} spids: [808] ) ] ) ] ) ] spids: [709 710 822 -1] ) ] ) (C {<echo>} {(DQ (${ Id.VSub_Name os_version_))}) (C {<unset>} {<os_name_>} {<os_release_>} {<os_version_>} {<major_>} {<minor_>}) ] ) ) (command.ShFunction name: versions_shellVersion body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:shell_) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [860] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:shell_present_) op: assign_op.Equal rhs: {(${ Id.VSub_Name FALSE)} spids: [865] ) ] ) (command.Case to_match: {(DQ (${ Id.VSub_Name shell_))} arms: [ (case_arm pat_list: [{<ash>}] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {<-x>} {(SQ <'/bin/busybox'>)} {<Id.Lit_RBracket ']'>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:shell_present_) op: assign_op.Equal rhs: {(${ Id.VSub_Name TRUE)} spids: [898] ) ] ) ] ) ] spids: [882 883 904 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {<-x>} {(DQ (${ Id.VSub_Name shell_))} {<Id.Lit_RBracket ']'>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:shell_present_) op: assign_op.Equal rhs: {(${ Id.VSub_Name TRUE)} spids: [925] ) ] ) ] ) ] spids: [907 908 931 -1] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name shell_present_)} {<-eq>} {(${ Id.VSub_Name FALSE)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} {(SQ <'not installed'>)}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {(${ Id.VSub_Name FALSE)} ) ] spids: [937 954] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:version_) op: assign_op.Equal rhs: {(SQ )} spids: [975] ) ] ) (command.Case to_match: {(${ Id.VSub_Name shell_)} arms: [ (case_arm pat_list: [{<Id.Lit_Star '*'> <'/sh'>}] spids: [989 991 1022 -1] ) (case_arm pat_list: [{<ash>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<versions_shell_ash>} {(DQ (${ Id.VSub_Name shell_))}) ) } spids: [1028] ) ] ) ] spids: [1025 1026 1041 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'> <'/bash'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<versions_shell_bash>} {(DQ (${ Id.VSub_Name shell_))}) ) } spids: [1048] ) ] ) ] spids: [1044 1046 1061 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'> <'/dash'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<versions_shell_dash>}) ) } spids: [1081] ) ] ) ] spids: [1064 1066 1089 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'> <'/ksh'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<versions_shell_ksh>} {(DQ (${ Id.VSub_Name shell_))}) ) } spids: [1096] ) ] ) ] spids: [1092 1094 1109 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'> <'/pdksh'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<versions_shell_pdksh>} {(DQ (${ Id.VSub_Name shell_))}) ) } spids: [1116] ) ] ) ] spids: [1112 1114 1129 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'> <'/zsh'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<versions_shell_zsh>} {(DQ (${ Id.VSub_Name shell_))}) ) } spids: [1136] ) ] ) ] spids: [1132 1134 1149 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:version_) op: assign_op.Equal rhs: {(SQ <invalid>)} spids: [1155] ) ] ) ] spids: [1152 1153 -1 1161] ) ] ) (C {<echo>} { (DQ (braced_var_sub token: <Id.VSub_Name version_> suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:{<unknown>}) ) ) } ) (C {<unset>} {<shell_>} {<version_>}) ] ) ) (command.ShFunction name: versions_shell_ash body: (BraceGroup children: [ (command.Pipeline children: [ (C {<busybox>} {<--help>}) (C {<head>} {<-1>}) (C {<sed>} {(SQ <'s/BusyBox v\\([0-9.]*\\) .*/\\1/'>)}) ] negated: F ) ] ) ) (command.ShFunction name: versions_shell_bash body: (BraceGroup children: [ (command.Pipeline children: [ (command.Simple words: [{($ Id.VSub_Number '$1')} {<--version>}] redirects: [(redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})] do_fork: T ) (C {<grep>} {(SQ <'GNU bash'>)}) (C {<sed>} {(SQ <'s/.*version \\([^ ]*\\).*/\\1/'>)}) ] negated: F ) ] ) ) (command.ShFunction name: versions_shell_dash body: (BraceGroup children: [ (command.Simple words: [{<eval>} {<dpkg>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>}) ] do_fork: T ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<127>} {<Id.Lit_RBracket ']'>} ) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] ) (command.Pipeline children: [ (C {<dpkg>} {<-l>}) (C {<grep>} {(SQ <' dash '>)}) (C {<awk>} {(SQ <'{print $3}'>)}) ] negated: F ) ] ) ) (command.ShFunction name: versions_shell_ksh body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:versions_shell_) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1310] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:versions_version_) op: assign_op.Equal rhs: {(SQ )} spids: [1314] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:versions_version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Simple words: [ {(${ Id.VSub_Name versions_shell_)} {<--version>} {<Id.Lit_Colon ':'>} ] redirects: [ (redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] do_fork: T ) ) } spids: [1326] ) ] ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:versions_version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {(DQ (${ Id.VSub_Name versions_version_))}) (C {<sed>} { (SQ < 's/.*\\([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]\\).*/\\1/' > ) } ) ] negated: F ) ) } spids: [1346] ) ] ) ] spids: [1324 1343] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name versions_version_))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<_versions_have_strings>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:versions_version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (command.Simple words: [{<strings>} {(DQ (${ Id.VSub_Name versions_shell_))}] redirects: [ (redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] do_fork: T ) (C {<grep>} {<Version>}) (C {<sed>} {(SQ <'s/^.*Version \\(.*\\)$/\\1/;s/ s+ $$//;s/ /-/g'>)} ) ] negated: F ) ) } spids: [1402] ) ] ) ] spids: [1381 1396] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name versions_version_))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:versions_version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<versions_shell_pdksh>} {(DQ (${ Id.VSub_Name versions_shell_))}) ) } spids: [1470] ) ] ) ] spids: [1452 1467] ) ] ) (C {<echo>} {(DQ (${ Id.VSub_Name versions_version_))}) (C {<unset>} {<versions_shell_>} {<versions_version_>}) ] ) ) (command.ShFunction name: versions_shell_pdksh body: (BraceGroup children: [ (C {<_versions_have_strings>}) (command.Pipeline children: [ (command.Simple words: [{<strings>} {(DQ ($ Id.VSub_Number '$1'))}] redirects: [(redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})] do_fork: T ) (C {<grep>} {(SQ <'PD KSH'>)}) (C {<sed>} {<-e>} {(SQ <'s/.*PD KSH \\(.*\\)/\\1/;s/ /-/g'>)}) ] negated: F ) ] ) ) (command.ShFunction name: versions_shell_zsh body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:versions_shell_) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1555] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:versions_version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {(SQ <'echo ${ZSH_VERSION}'>)}) (C {(${ Id.VSub_Name versions_shell_)}) ] negated: F ) ) } spids: [1568] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name versions_version_))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:versions_version_) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (command.Simple words: [{(${ Id.VSub_Name versions_shell_)} {<--version>}] redirects: [ (redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] do_fork: T ) (C {<awk>} {(SQ <'{print $2}'>)}) ] negated: F ) ) } spids: [1604] ) ] ) ] spids: [1586 1601] ) ] ) (C {<echo>} {(DQ (${ Id.VSub_Name versions_version_))}) (C {<unset>} {<versions_shell_>} {<versions_version_>}) ] ) ) (command.ShFunction name: _versions_have_strings body: (BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name __versions_haveStrings)} {<-ne>} {(${ Id.VSub_Name ERROR)} {<Id.Lit_RBracket ']'>} ) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple words: [{<eval>} {<strings>} {<'/dev/null'>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:__versions_haveStrings) op: assign_op.Equal rhs: {(${ Id.VSub_Name TRUE)} spids: [1695] ) ] ) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] spids: [1677 1692] ) ] ) (command.Simple words: [{<echo>} {(SQ <'WARN: strings not installed. try installing binutils?'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:__versions_haveStrings) op: assign_op.Equal rhs: {(${ Id.VSub_Name FALSE)} spids: [1718] ) ] ) ] ) ) (command.ShFunction name: versions_main body: (BraceGroup children: [ (C {<set>} {<-u>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_name) op: assign_op.Equal rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<versions_osName>}))} spids: [1743] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os_version) op: assign_op.Equal rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<versions_osVersion>}))} spids: [1751] ) ] ) (C {<echo>} {(DQ <'os: '> (${ Id.VSub_Name os_name) <' version: '> (${ Id.VSub_Name os_version))} ) (command.ForEach iter_name: shell iter_words: [{(${ Id.VSub_Name VERSIONS_SHELLS)}] do_arg_iter: F body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:shell_version) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<versions_shellVersion>} {(DQ (${ Id.VSub_Name shell))}) ) } spids: [1788] ) ] ) (C {<echo>} { (DQ <'shell: '> (${ Id.VSub_Name shell) <' version: '> (${ Id.VSub_Name shell_version) ) } ) ] ) ) ] ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name ARGV0))} {<Id.Lit_Equals '='>} {(SQ <versions>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<versions_main>} {(DQ ($ Id.VSub_At '$@'))})] spids: [1821 1840] ) ] ) ] )