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

According to [EMAIL PROTECTED] on 10/29/2006 3:39 AM:
> Why is it that word splitting never makes a distinction between
> newlines and space?

Because POSIX, and tradition, say so.

>  Because the output of grep -l, and ls, etc are
> clearly newline delimited.

That is a flawed argument.  Filenames can contain newlines.  The only SAFE
way to pass arbitrary filenames is null-delimited, if you are truly
worried about metacharacters in the name.  True, spaces are more common
than newlines, but if you are going for safety, then go all the way.

> It is bash (and others) which quite deliberately
> reduce available information by converting all newlines and whitespace
> into a single space.

Only when told to do so by IFS on underquoted variable expansions and
process substitutions.

> 
> Something simple like "vi $(^grep -l xx *)" would do.
> The ^ might work because it denotes line-orientated regex (and nobody
> uses it for pipes any more).

Actually, that is well-defined by POSIX to invoke the command '^grep'.  If
you are going to propose a new operator, you had better choose one that
POSIX leaves unspecified.  But you are correct that no one uses ^ for
pipes any more - POSIX does not allow ^ to mean pipes.

- --
Life is short - so eat dessert first!

Eric Blake             [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFRLic84KuGfSFAYARAkpJAKDPaGqatGxoa/+MNa1KkxXrDT5b/gCgj8M7
dITpRD31yQbvBtywLEF9nK4=
=gJ9Z
-----END PGP SIGNATURE-----


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to