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 > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
please explain the below mail2sant Shell Programming and Scripting 1 04-04-2008 08:04 AM
Please can any one explain this ${0##/} gadege Shell Programming and Scripting 2 04-01-2008 03:26 PM
please explain this dummy_needhelp Shell Programming and Scripting 2 10-15-2007 01:17 AM
Can anyone explain plz r_W213 UNIX for Advanced & Expert Users 3 03-27-2007 04:52 AM
if [ $? -eq 0 ] .. can someone explain this? ranjita.c Shell Programming and Scripting 5 10-03-2006 07:50 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-24-2008
appsdba.nitin appsdba.nitin is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 5
Exclamation Please explain this

if [ $# != 3 ]
then
echo "Syntax: $0 <sid> <COLD/HOT> <DEST>"
exit
fi



if [ $# != 3 ]--------------what does this mean???
echo "Syntax: $0 <sid> <COLD/HOT> <DEST>"---pls explain this as well
  #2 (permalink)  
Old 09-24-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
  
 

Join Date: Dec 2007
Location: Home of 17-time world champion Boston Celtics
Posts: 1,311
Wink

It refers to the number of parameters the command is expecting. In this case, it expects three. If there are not three parameters on the command line, then error and tell you the command line format.

In your case -- $0 <sid> <COLD/HOT> <DEST>
it looks to a command
1st parmater being the sid
2nd being either HOT or COLD
3d being the dest (assume destination)
  #3 (permalink)  
Old 09-24-2008
appsdba.nitin appsdba.nitin is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 5
Thanks man !!
Closed Thread

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 05:18 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