Shell scripting...command line parameters

Smoot Carl-Mitchell smoot at tic.com
Wed Aug 6 22:44:22 UTC 2008


On Tue, 2008-08-05 at 23:53 -0700, raju wrote:

> How can i pass values passed from command lines as 
> 
> runtests.sh configFile=C:/test.properties test-mode=trial instead of picking
> $1 and $2

Take a look at:

man getopt

It does shell option parsing in the "standard" way.  It will let you
write something like:

runtest.sh --configFile=test.properties --test-mode=trial
-- 
Smoot Carl-Mitchell
System/Network Architect
smoot at tic.com
+1 480 922 7313
cell: +1 602 421 9005




More information about the ubuntu-users mailing list