how to read the entire list of arguments pass

September 22, 2011 at 07:55:43
Specs: Unix
how to read the entire list/line of arguments passed in to a script?

$@ or $* will give the entire line.

For example:

unload_rows temp_tables ${ORASTAGEDB} temp.txt -2 -y -l '|' -d /export/home/mdperf
when i run this and echo $@ inside unload_rows the output will be:
temp_tables ${ORASTAGEDB} temp.txt -2 -y -l | -d /export/home/mdperf
but it is removing the single quotes. is there a way to display the quotes aswell?


See More: how to read the entire list of arguments pass

Report •

#1
September 22, 2011 at 09:22:27
Place all the arguments in double quotes:

./unload_rows "temp_tables ${ORASTAGEDB} temp.txt -2 -y -l '|' -d /export/home/mdperf"


Report •
Related Solutions


Ask Question