csh and echo

看板FB_questions作者時間10年前 (2014/05/30 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/5 (看更多)
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 -=-=-=-=-=- _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
文章代碼(AID): #1JXtNVaT (FB_questions)
文章代碼(AID): #1JXtNVaT (FB_questions)