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
./yourscript admin
#!/bin/csh -f
#
cd /usr/$1
pwd
exit
Hi naamas03,
I wrote something for example:
#! /bin/csh
set DIR=$1
cd $ORACLE_HOME/$DIR
ls
The script is executed as the following:
./send_param.csh bin
I sent paramter to the script . In this case is the directory "bin".
Regards,
Nir