Re: plink removes quote marks
From: Derrin Chong (derrin_at_lava.net)
Date: Fri, 28 Nov 2003 11:02:33 -1000
Jim Davis wrote:
> Derrin Chong wrote:
>> plink -load 'OG' -l joe.staff sudo /usr/local/sbin/disable-account
>> joetest --service 'dialup flat' --reason 'abuse'
>> So disable-account won't run because it's expecting the --service
>> option argument to be quoted.
>> Anyone know how to fix this?
> You could try creating a temporary file with the commands in it,
> suitably escaped, like:
> ----start tempfile.txt----
> sudo /usr/local/sbin/disable-account joetest --service \"dialup flat\"
> --reason \"abuse\"
> ----end tempfile.txt----
> Then use plink's -m parameter:
> plink -load 'OG' -l joe.staff -m tempfile.txt
> Maybe someone else will have a better method... I doubt it's plink
> stripping the quotes out, so much as it is the Windows command interpreter.
Thanks for the idea. I'll probably end up removing the whitespace from
our product id's though.