[Thread Prev][Thread Next][Index]

Re: [ferret_users] whitespace within command-line arguments



Hi Russ,

Escaping with a backslash works for me with V7.1

ferret -script tmp.jnl "hello" "a\ b\ c" "world"
1st--hello--
2nd--a b c--
3rd--world-

Confirmed!  Thanks!

I'm curious. Why does Ferret process the parameters before assigning them to ($1), ($2), etc.?  (That must be the reason why the whitespaces must be escaped.)

For example,

$ ferret -script tmp.jnl 'hello' '$3' 'world'
1st--hello--
2nd--world--
3rd--world--
$

The second argument is replaced with the third!  (No, it's not the shell that does the substitution.)

This must be by design.  But how is this feature supposed to be used?

Cheers,

Ryo

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement