![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Assign script parameters to variables | giorgos193 | Shell Programming and Scripting | 16 | 04-14-2008 09:12 PM |
| help me in sending parameters from sqlplus script to unix shell script | Hara | Shell Programming and Scripting | 2 | 01-29-2008 12:31 PM |
| Random parameters passing in FTP script | sourabhshakya | Shell Programming and Scripting | 2 | 06-12-2006 08:20 AM |
| parameters from my program in c to a .ksh script | DebianJ | High Level Programming | 2 | 05-16-2005 03:04 PM |
| Passing parameters in script | eliguy | UNIX for Dummies Questions & Answers | 1 | 08-01-2001 10:13 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
how to send parameters to script
hi all
i have a script in c-shell call test that i want to send to him parameter name of directory to go to something like this the script : cd /usr/(here i want that he will go to the name of the directory that i send to him as a parameter) like :/usr/admin admin is the parameter the problem is that the parameter always change (admin,test) etc. ho shell i write script like this ? can someone help me ? best regards |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
./yourscript admin
#!/bin/csh -f # cd /usr/$1 pwd exit |
|
#3
|
|||
|
|||
|
Hi naamas03,
I wrote something for example: Code:
#! /bin/csh set DIR=$1 cd $ORACLE_HOME/$DIR ls Code:
./send_param.csh bin Regards, Nir |
|||
| Google The UNIX and Linux Forums |