hi all
let say I run the ./xxx.bash x x x x or ./xxx.bash x x x or ./xxx.bash x x x x x
the last argument always a filename
the last arugment filename format is 5-10-22.txt
my question is how can I put this arugment into variable and I can use it in sed or any other way that i can use
I have tried use the following commands but not work
var=$#
sed -n '/xxxxx/p' \$$var > xxx
thank all