Bug with tcsh? : if evaluating true instead of false

Garrett Cooper youshi10 at u.washington.edu
Wed Oct 25 19:15:31 UTC 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Robillard wrote:
>> 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

I appreciate the help thanks! I usually do stuff in either bash or csh,
depending on the level of difficulty, but try to use tcsh for all
FreeBSD scripts on my system since tcsh is included as a part of the
base system. Plus, I do like tcsh better in some ways because the syntax
is similar to C/C++ and Java, but as you saw if I get in a programming
funk with either of the 3 beforementioned languages, it's fun
remembering language semantics sometimes :).

I'd appreciate the script though, definitely, as any resource I have to
learn all Unix script languages properly will only help in my becoming a
better Unix admin as well as script more common tasks to help make my
life a bit easier.

Thanks!
- -Garrett
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFP7e66CkrZkzMC68RAhsUAJ93jj0Qx1aFcVPLe0WT9xGnSiaEIQCdFiq1
D3AaQo5y5wv9Pcn8G4WbYQM=
=LcA7
-----END PGP SIGNATURE-----


More information about the freebsd-questions mailing list