Script for compiling Xorg

Randy McMurchy randy at linuxfromscratch.org
Sat Aug 4 04:23:36 PDT 2007


Simon Geard wrote these words on 08/03/07 23:25 CST:

> Again, I don't see any merit in using -e in an interactive shell.

Sometimes, a simple 10 second experiment is worth 1000 words:

randy at rmlscsi: ~/td > ls -l
total 0
-rw-r--r-- 1 randy randy 0 Aug  4 06:14 a
-rw-r--r-- 1 randy randy 0 Aug  4 06:14 b
-rw-r--r-- 1 randy randy 0 Aug  4 06:14 c
-rw-r--r-- 1 randy randy 0 Aug  4 06:14 e
-rw-r--r-- 1 randy randy 0 Aug  4 06:14 f
-rw-r--r-- 1 randy randy 0 Aug  4 06:14 g
-rw-r--r-- 1 randy randy 0 Aug  4 06:14 h


randy at rmlscsi: ~/td > bash -e
randy at rmlscsi: ~/td > for FILENAME in {a..h}; do ls $FILENAME; done
a
b
c
ls: d: No such file or directory

randy at rmlscsi: ~/td > for FILENAME in {a..h}; do ls $FILENAME; done
a
b
c
ls: d: No such file or directory
e
f
g
h


Note that in the first loop using the shell with -e, the rest
of the loop after failing on the missing 'd' file is *not*
executed by the parent shell.

It appears to me that what is in the book would work as intended.

-- 
Randy

rmlscsi: [bogomips 1003.26] [GNU ld version 2.16.1] [gcc (GCC) 4.0.3]
[GNU C Library stable release version 2.3.6] [Linux 2.6.14.3 i686]
06:19:00 up 2 days, 6:10, 1 user, load average: 1.12, 1.12, 0.79



More information about the blfs-support mailing list