The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
when executing .sh script in telnet error "script not found" smiley Shell Programming and Scripting 1 04-22-2008 02:01 PM
awk Shell Script error : "Syntax Error : `Split' unexpected Herry UNIX for Dummies Questions & Answers 2 03-17-2008 11:16 AM
Script error Katkota UNIX for Dummies Questions & Answers 3 01-22-2008 06:02 PM
error in script??? gkrishnag UNIX for Dummies Questions & Answers 3 09-20-2006 11:54 AM
Script Error dreams5617 Shell Programming and Scripting 1 11-12-2004 04:17 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-20-2008
himvat himvat is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 68
error in the script

#!/bin/sh
diff C:\Janotech\bin\sample_file.log C:\Janotech\bin\sample_file.log.1 > C:\Janotech\bin\DIFFERENCE.log
cp C:\Janotech\bin\sample_file.log C:\Janotech\bin\sample_file.log.1
grep "ERROR" C:\Janotech\bin\DIFFERENCE.log
if [ $? –eq 0 ]; then
echo "1"
else
echo "0"
fi



I am trying to run this script but getting the following error.

./test3.sh[9]: [: –eq: unexpected operator/operand
0


Kindly suggest what missing in this

Regards
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:32 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0