If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > comparison

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-18-05, 22:14
izza_azhar izza_azhar is offline
Registered User
 
Join Date: Jan 2005
Posts: 8
comparison

if -ge =greater /equal
-le = less/ equal

what if we want just equal
i cannot used (=)

eg:
if [ $file_year = $curr_year ]
echo "..."
fi

if [ $file_year = $curr_year + 1 ]--> this comparison also wrong
echo"...
else
echo"....
fi
Reply With Quote
  #2 (permalink)  
Old 01-19-05, 03:13
srsjc srsjc is offline
Registered User
 
Join Date: Jun 2004
Posts: 20
-eq - equal
-ge - greater or equal
-le - lesser or equal
-lt - less than
-gt - greater than
-ne - not equal
Reply With Quote
  #3 (permalink)  
Old 01-19-05, 03:21
izza_azhar izza_azhar is offline
Registered User
 
Join Date: Jan 2005
Posts: 8
thanks

it really help me...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On