Error Running Sqlplus Return Code = 127
Contents |
>ExampleComments1Catchall for general errorslet "var1 = 1/0"Miscellaneous errors, such as linux exit codes "divide by zero" and other impermissible operations2
Exit Code 255 Linux
>Misuse of shell builtins (according to Bash documentation)empty_function() {}Missing keyword or command,
Bash Exit Codes
or permission problem (and diff return code on a failed binary file comparison).126Command invoked cannot execute/dev/nullPermission problem
Bash Exit Code Check
or command is not an executable127"command not found"illegal_commandPossible problem with $PATH or a typo128Invalid argument to exitexit 3.14159exit takes only integer args in the range 0 - 255 (see first footnote)128+nFatal exit code 0 error signal "n"kill -9 $PPID of script$? returns 137 (128 + 9)130Script terminated by Control-CCtl-CControl-C is fatal error signal 2, (130 = 128 + 2, see above)255*Exit status out of rangeexit -1exit takes only integer args in the range 0 - 255
Us How to fix bash 127 error return code Let's consider a following back script example. The exit code 137 script returns error value using $? variable. $ cat bash-127.sh exit code 255 windows #bin/bash non-existing-command echo $? After execution we can see the the actual error message and bash exit status 2 127 error return code: $ ./bash-127.sh ./bash-127.sh: line 3: non-existing-command: command not found 127 Value 127 is returned by your shell /bin/bash when any given http://tldp.org/LDP/abs/html/exitcodes.html command within your bash script or on bash command line is not found in any of the paths defined by PATH system environment variable. The solution is to make sure that the command your are using can be found within your $PATH. If the command is not in your path https://linuxconfig.org/how-to-fix-bash-127-error-return-code either include it or use absolute full path to it. For more information see EXIT STATUS section of the bash man page. Please enable JavaScript to view the comments powered by Disqus. Free Linux eBooks Introduction to Linux - A Hands on Guide Open Source Security Tools An Introduction to Design Patterns in C++ with Qt 4 Linux® Patch Management Ubuntu Linux Toolbox: 1000+ Commands Linux Device Drivers, 2nd Edition Java™ Application Development on Linux Linux® Quick Fix Notebook User Mode Linux Managing Linux® Systems with Webmin™ The Official Samba-3 HOWTO and Reference Guide Self-Service Linux®: Mastering the Art of Problem Determination Understanding the Linux® Virtual Memory Manager Tradepub EbooksIntroduction to Linux - A Hands on Guidehttp://linuxconfig-org.tradepub.com/free/w_mach01/?p=w_mach01Understanding the Linux® Virtual Memory Managerhttp://linuxconfig-org.tradepub.com/free/w_infk10/?p=w_infk10User Mode Linuxhttp://linuxconfig-org.tradepub.com/free/w_infk09/?p=w_infk09Self-Service Linux®: Mastering the Art of Problem Determinationhttp://linuxconfig-org.tradepub.com/free/w_infk03/?p=w_infk03Linux® Quick Fix Notebookhttp://linuxconfig-org.tradepub.com/free/w_infk02/?p=w_infk02Managing Linux® Systems with Webmin™http://linuxconfig-org.tradepub.com/free/w_infk05/?p=w_infk05Linux® Patch Managementhttp://linuxconfig-org.tradepub.com/free/w_infk12/?p=w_infk12The Official Samba-3 HOWTO and Reference Guidehttp://linuxconfig-org.tradepub.com/free/w_infk14/?p=w_infk14Linux Device Drivers, 2nd Editionhttp:
Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here. Search Forums Show Threads Show Posts http://www.unix.com/shell-programming-and-scripting/165562-execution-shell-script-returns-error-127-a.html Tag Search Advanced Search Unanswered Threads Find All Thanked Posts Go to Page... learn linux and unix commands - unix shell scripting Execution of shell script returns error 127 Shell Programming and Scripting Page 1 of 2 1 2 > Thread Tools Search this Thread Display Modes #1 08-18-2011 RuchirP Registered User Join Date: exit code Aug 2011 Last Activity: 18 August 2011, 7:50 AM EDT Posts: 4 Thanks: 1 Thanked 0 Times in 0 Posts Execution of shell script returns error 127 Hi All, While running shell script i got following output. interpreter "usr/bin/ksh" not found sh: step1.sh: not found. ldnhpux | oracle >echo $? 127 - Running command "which ksh" retruns "usr/bin/ksh". - I found some information on web exit code 255 stating to remove extra carriage return chars, To achieve that I tried using cat and sed commands. Did not work though. - I tried ftp the file in ASC mode. No luck. Any ideas ? Regards Remove advertisements Sponsored Links RuchirP View Public Profile Find all posts by RuchirP #2 08-18-2011 michaelrozar17 Registered User Join Date: Jul 2010 Last Activity: 22 September 2016, 3:57 AM EDT Location: IN Posts: 894 Thanks: 15 Thanked 183 Times in 174 Posts Can you post 1. Permission given to the script 2. How did you execute the script in command line. (./scriptname or sh scriptname etc) 3. Contents of the script. Remove advertisements Sponsored Links michaelrozar17 View Public Profile Find all posts by michaelrozar17 #3 08-18-2011 RuchirP Registered User Join Date: Aug 2011 Last Activity: 18 August 2011, 7:50 AM EDT Posts: 4 Thanks: 1 Thanked 0 Times in 0 Posts 1. -rwxrwxrwx 1 oracle oinstall 3318 Aug 17 19:00 step1.sh 2. >step1.sh