[Omaha.pm] Net::SSH::Perl Alternative Solution

Tony Simons webmaster at tvortex.net
Fri Dec 14 12:23:47 PST 2007


Unlike bash can I use variables in '$test'  "$test"...haven't had a
chance to try it yet.


Dan Linder wrote:
> Tony Simons wrote:
>> Even though I don't really like the idea of using a password in a script
>> I've decided to work with an alternative that works as well...may even
>> be a shorter script. Net::SSH::Expect
>>
>> Jay, I have a question for you if you have the time.
>> Lets say I have some variables in a script that I want to dump out to
>> the serial number file.  I'm having troubles with the "" part and
>> writing that to the file.  Ideas?
>>
>> Example
>> SERIALNUMBER="asdf123123123"
>>
>>   
>
> Use the \ to escape the embedded quotes.
>
> printf "SERIALNUMBER=\"asdf123123123\"";
>
> ...or use single quotes -- ' -- to keep all internal quotes from being
> seen.
>
> printf 'SERIALNUMBER="asdf123123123"';
>
> Dan
>



More information about the Omaha-pm mailing list