From owner-freebsd-questions@FreeBSD.ORG Thu May 29 16:11:25 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5157F37 for ; Thu, 29 May 2014 16:11:25 +0000 (UTC) Received: from nqhost.drenet.net (nqhost.drenet.net [184.95.47.164]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB31D2A1E for ; Thu, 29 May 2014 16:11:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by nqhost.drenet.net (Postfix) with ESMTP id 101A83ADF9 for ; Thu, 29 May 2014 12:02:36 -0400 (EDT) Received: from nqhost.drenet.net ([127.0.0.1]) by localhost (nqhost.drenet.net [127.0.0.1]) (maiad, port 10024) with ESMTP id 31210-01 for ; Thu, 29 May 2014 12:02:35 -0400 (EDT) Received: by nqhost.drenet.net (Postfix, from userid 80) id B27573ADF5; Thu, 29 May 2014 12:02:35 -0400 (EDT) To: FreeBSD Questions Subject: csh and echo X-PHP-Originating-Script: 80:rcmail.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 29 May 2014 12:02:35 -0400 From: Andre Goree Message-ID: <6afd2e37bfc1736513878d896c5c8314@drenet.net> X-Sender: andre@drenet.net User-Agent: Roundcube Webmail/0.9.5 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2014 16:11:26 -0000 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 -=-=-=-=-=-