PDA

View Full Version : Shell Script problem using double quotes inside double quotes and storing in variable



sanjay singh
February 19th, 2013, 01:08 PM
Hi,
I have a problem in using double quotes inside double quotes as follows:--
s1="-r printer:sanjay=\"HP LaserJet 1018\""

Whenever i am using the value of variable s1 inside command as follows:--
rdesktop -u administrator -p admin $s1 ip-address

the command is not executing as expected..

But if i am writing it directly like:--
rdesktop -u administrator -p admin -r printer:sanjay="HP LaserJet 1018"ip-address

its working fyn..

plz help me to getting out of this stuff..

sandyd
February 19th, 2013, 03:19 PM
closed -please do not post multiple threads on the same subject as this dilutes community effort.

Thanks!

http://ubuntuforums.org/showthread.php?t=2117719