On 06/23/2010 09:44 PM, Steven A. DuChene wrote:
> The core part of the script I am having a problem with looks like:
>
> #!/bin/bash
>
> OPASS=$2
>
> PASS=`perl -e 'print("userPassword: {CRYPT}".crypt("$OPASS","frat-salt")."\n");'`
Try changing it to this:
PASS=`perl -e 'print("userPassword:
{CRYPT}".crypt("'$OPASS'","frat-salt")."\n");'`
That change is to add single quotes around the bash variable, the idea
is that you have to turn off the quoting log enough allow bash to be
able to insert a variable and then turn it back on so everything else
will work correctly. It doesn't work in most other languages, but bash
isn't like most other languages :)
Brian Cluff
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss