The UNIX and Linux Forums  


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
using a vaiable parameters and values to find and tar jjminkle Shell Programming and Scripting 1 05-02-2008 06:12 PM
parameters jaay Shell Programming and Scripting 4 04-14-2008 05:10 AM
How to Find AIX system parameters R00tSc0rpi0n UNIX for Advanced & Expert Users 1 01-25-2007 01:56 AM
Need Parameters Help. james2006 Shell Programming and Scripting 3 06-08-2006 11:46 AM
tar parameters kmar UNIX for Advanced & Expert Users 4 10-23-2001 04:03 AM

 
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 06-22-2006
J_ang J_ang is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 15
Is it possible to find parameters?

I have a shell script and i pass 3 parameters to it.
Just give you an example

test.sh a=y/n b=y/n c=y/n

Pass y/n to a, b and c then it will decide what to do.

test.sh a=y b=n c=n

What i would like to do is rather then passing 3 parameter just pass a=y (only a is doing something like test.sh a=y) and skip others.
Now don't know if it is possible to look for something in parameters?
(Something like find if a,b and c have given to script always there will be one parameter).
Some scenarios

test.sh a=n b=y c=n
What i want test.sh b=y (skip a & c don't pass because no need)
test.sh a=n b=n c=y
What i want test.sh c=y (skip a & b don't pass because no need)

Thanks in advance.
 

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:55 PM.


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