How to pass parameters to a Linux Bash script?
Posted
by chun
on Stack Overflow
See other posts from Stack Overflow
or by chun
Published on 2010-04-15T13:27:48Z
Indexed on
2010/04/15
15:13 UTC
Read the original article
Hit count: 317
I have a Linux bash script 'myshell'. I want it to read two dates as parameters, for example: myshell date1 date2
. I am a Java programmer, but don't know how to write a script to get this done.
The rest of the script is like this:
sed "s/$date1/$date2/g" wlacd_stat.xml >tmp.xml
mv tmp.xml wlacd_stat.xml
© Stack Overflow or respective owner