Shell & IFS
brandon at tdi2.UUCP
brandon at tdi2.UUCP
Thu Feb 26 02:09:20 AEST 1987
Expires:
Quoted from <4560 at brl-adm.ARPA> ["Make is Buggy"], by rbj at icst-cmr.arpa (Root Boy Jim)...
+---------------
| ]>Furthermore, it is a botch to *import* SHELL from the environment;
| ]>this causes Makefiles to work differently for people with different
| ]>login shells! "make" should NOT import SHELL.
+---------------
AMEN! Plexus ships a buggy csh with System V; I use it. Mix it with make
and KABOOM! I'm not happy with make.
+---------------
| ]And it *certainly* should not attempt to import things like IFS!
|
| Well, John Mashey once suggested asking `why' before flaming, and since
| someone brought it up, *** why does IFS even exist *** ?
+---------------
It's a kludgy way to do things that can be done in other ways (albeit more
slowly). Example:
IFS=':
' # newline and colon
while read name pass uid gid comment home shell; do
# do something with them
done < /etc/passwd
This is the ONLY way I've seen it used; frankly, I use "awk" if I want to
process a file in this way anyway, so I see no real use for IFS.
++Brandon
--
``for is he not of the Children of Luthien? Never shall that line fail, though
the years may lengthen beyond count.'' --J. R. R. Tolkien
Brandon S. Allbery UUCP: cbatt!cwruecmp!ncoast!tdi2!brandon
Tridelta Industries, Inc. CSNET: ncoast!allbery at Case
7350 Corporate Blvd. INTERNET: ncoast!allbery%Case.CSNET at relay.CS.NET
Mentor, Ohio 44060 PHONE: +1 216 255 1080 (home) +1 216 974 9210
More information about the Comp.unix.wizards
mailing list