Hi,
I would like to know how I can pass double quotes to a perl script in
a csh or sh in UNIX. ie
I have a test script which has:
#!/usr/local/bin/perl5
print "arg0\n";
print "\narg1\n";
print "\narg2\n";
print "\n";
and I say:
./test hello "1 2"
arg0
hello
arg1
1 2
arg2
I would like arg1 to be "1 2" and not just 1 2
It looks like the " are being stripped out of the argument by the
parser. Similarly, I would like:
./test hello '1 2'
arg0
hello
arg1
1 2
arg2
to print '1 2' for arg1.
the reason I need this is because I am passing "1 2" to another script
which requires these arguments to have "" around them. If the " is
missing, it only reads 1 instead of 1 2
IT is transparent to the user that this is a wrapper they are
executing and so I wnt to avoid doing things like \"1 2\" when passing
arguments.
Thanks in advance for any help,
Sam