![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| return code capturing for all commands connected by "|" ... | new_learner | UNIX for Dummies Questions & Answers | 6 | 12-16-2008 05:58 AM |
| The "PS" command was displaying*terminals named as "SYSCON" | kiranjose85 | UNIX for Advanced & Expert Users | 1 | 11-28-2008 07:53 AM |
| #!/bin/sh script fails at StringA | tr "[x]" "[y]" | by_tg | UNIX for Dummies Questions & Answers | 3 | 02-22-2008 12:17 PM |
| Shell Script fails with "can't connect to client" | sseenu79 | HP-UX | 2 | 12-20-2006 10:47 AM |
| Failed to check status code in "rsh" command | nir_s | Shell Programming and Scripting | 9 | 07-03-2006 09:05 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Return code is "0" though the command fails.
The return code is "0" though the command fails. How to get a return code of "1" for this command when it fails or modify the command to get the right return code?
On HP UNIX #-------- SCRIPT ---- #!/bin/ksh find /opt/oracle/oroem/product/10.2.0.4/rdbms/audit/ \( -name "*.aud" \) -mtime +1 -exec rm -f {} \; echo "Return Error Code" $? ------------------OUTPUT------------- > b.sh rm: /opt/oracle/oroem/product/10.2.0.4/rdbms/audit/ora_12289.aud not removed. Permission denied Return Error Code 0 |
![]() |
| Bookmarks |
| Tags |
| mtime |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|