![]() |
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 |
| PERL cgi script... extra character driving me crazy | audiophile | Shell Programming and Scripting | 2 | 09-08-2008 04:16 AM |
| How redirect script output from inside of script? | alex_5161 | Shell Programming and Scripting | 4 | 06-25-2008 10:27 PM |
| Need some help with this script -- extra eyes | gzs553 | Shell Programming and Scripting | 15 | 04-25-2008 11:49 PM |
| exporting number into .csv file in text form (no other extra charc) from shell script | Deepak_Rastogi | Shell Programming and Scripting | 5 | 03-13-2008 04:08 PM |
| manipulating csv to add extra row | neil546 | Shell Programming and Scripting | 3 | 07-16-2007 07:11 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Extra output in the script
Hi ,
I am trying to execute the following script. #!/bin/sh find . -name "common.log.diff" if [$? -eq 1]; then cp common.log common.log.diff diff common.log common.log.diff > DIFFERENCE.log cp common.log common.log.diff grep "ERROR" DIFFERENCE.log if [ $? -eq 0 ]; then echo "1" else echo "0" fi else diff common.log common.log.diff > DIFFERENCE.log cp common.log common.log.diff grep "ERROR" DIFFERENCE.log if [ $? -eq 0 ]; then echo "1" else echo "0" fi fi This is giving the following output. ./testscript ./common.log.diff ./testscript[3]: [0: not found. 0 In this " 0 " is fine. But I dont know why it is giving ./common.log.diff & ./testscript[3]: [0: not found. along with "0" Kindly suggest. What wrong with my script ? Regards |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|