Hi List,
Is it possible to pass one argument to a shell program
eg) there is a shell program abc which takes one arguments
abc one
Due to some reasons I pass
abc one two
Now one,two must be considered as "one" argument to the shell programs. Any suggestions,hints are welcome.
Venkat
Venkata,
change the IFS for your shell. By default it is a "space". change it to some other values so that "one two" id taken as a single argument.
Another way you can do it is this:
#!/bin/sh
args="$@"
echo $args
In place of @, you could do something like "$*", although they might both mess up your spacing, depending on the shell you are using...