From owner-freebsd-questions@FreeBSD.ORG Wed Oct 25 16:46:54 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A425316A412 for ; Wed, 25 Oct 2006 16:46:54 +0000 (UTC) (envelope-from david.robillard@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id F06A043D6B for ; Wed, 25 Oct 2006 16:46:48 +0000 (GMT) (envelope-from david.robillard@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so129308uge for ; Wed, 25 Oct 2006 09:46:48 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=mANHhasMSYUgyssvtYpesKiURxSXdsqj09k5/q63crptL74REOciji3+seZPKwqGyaOsfYuPUk2Tw2iBmgSeTlXMWVLBG/pNlPz2s8S1ZoI0N7Qy1q6+mpZtJc6ICyV7fCVhTrf4ewJYVG8Ds8Q3oG7M/pqun2afHbR19Q5Up2U= Received: by 10.67.27.3 with SMTP id e3mr1174122ugj; Wed, 25 Oct 2006 09:40:12 -0700 (PDT) Received: by 10.67.105.15 with HTTP; Wed, 25 Oct 2006 09:40:12 -0700 (PDT) Message-ID: <226ae0c60610250940h43c1bea8o77326728f15ed058@mail.gmail.com> Date: Wed, 25 Oct 2006 12:40:12 -0400 From: "David Robillard" To: "Garrett Cooper" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: FreeBSD Questions Mailing List Subject: Re: Bug with tcsh? : if evaluating true instead of false X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Oct 2006 16:46:54 -0000 > Ok, so I tried to make a simple script to add users so I wouldn't have > to type in groups/pw over and over again... the problem is that it's not > behaving like it should =o. [ ...8<... Removed a bunch of lines ...8<... ] IMHO, if you need to script something, use /bin/sh. It's the standard shell interpreter on all flavors of UNIX and Linux (except maybe MacOS X). All of the rc scripts are written with it. So why bother with another shell? Here's an interesting read on the topic: http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ BTW, Tom Christiansen who wrote this is co-author of "Programming Perl" from O'Reilly. So, Garret, if you need help with this, I have a /bin/sh version of the script you're trying to do. Just drop me a line and I'll send it to you. Just my two cents :) David -- David Robillard UNIX systems administrator & Oracle DBA CISSP, RHCE & Sun Certified Security Administrator Montreal: +1 514 966 0122