Date: Thu, 29 May 2014 12:02:35 -0400 From: Andre Goree <andre@drenet.net> To: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: csh and echo Message-ID: <6afd2e37bfc1736513878d896c5c8314@drenet.net>
next in thread | raw e-mail | index | archive | help
I'm writing a script within which I need to have encrypted passwords passed to 'pw mod user'. My issue is that csh does not seem to escape the the "$" correctly and thus I receive an "Undefined variable" error message. Bash does not seem to have this same issue: root@fbsdtest13:~ # echo "$1$rVxldcGZ$CisrIAX4SBYUkMJt9KjXl0" rVxldcGZ: Undefined variable. root@fbsdtest13:~ # bash [root@fbsdtest13 ~]# echo "$1$rVxldcGZ$CisrIAX4SBYUkMJt9KjXl0" [root@fbsdtest13 ~]# echo "\$1\$rVxldcGZ\$CisrIAX4SBYUkMJt9KjXl0" $1$rVxldcGZ$CisrIAX4SBYUkMJt9KjXl0 [root@fbsdtest13 ~]# exit root@fbsdtest13:~ # echo "\$1\$rVxldcGZ\$CisrIAX4SBYUkMJt9KjXl0" rVxldcGZ: Undefined variable. Any insight would be greatly appreciated! :) -- Andre Goree -=-=-=-=-=- Email - andre at drenet.net Website - http://www.drenet.net PGP key - http://www.drenet.net/pubkey.txt -=-=-=-=-=-
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6afd2e37bfc1736513878d896c5c8314>