[EMAIL PROTECTED] (Bob Proulx) writes: >> 2- word splitting when IFS contains non-blank characters varies >> from one shell to the next, and in most implementations >> (including bash and AT&T ksh, it differs from the way the shell >> splits $PATH internally to look up a command ("/bin:" is "/bin" >> and "" as far as PATH look up is concerned > > Negative. In AT&T ksh (and others) "/bin:" is "/bin" and "." for PATH > lookup. > >> while bash world splitting splits "/bin:" into only "/bin"). > > Negative. In bash "/bin:" is "/bin" and "." for PATH lookup.
The point is that word splitting does not preserve the empty element at the end, thus it differs from PATH lookup. $ (PATH=/bin:; IFS=:; for x in $PATH; do echo "$x"; done) | wc -l 1 Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash