bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spaces in args, escapes, and command substitution


From: Eric Blake
Subject: Re: Spaces in args, escapes, and command substitution
Date: Sun, 29 Oct 2006 16:55:40 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.666

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

According to bash@zacglen.com on 10/29/2006 4:52 PM:
> 
> I took a very deep breath and did this from command line:
> 
>     IFS='\n' vi $(grep -l PATTERN *)
> 
> and guess what - it does not work!

That's because you set IFS for the vi, but not for the command
substitution.  Break your result into two commands:

IFS='\n'
vi $(grep -l PATTERN *)

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

Eric Blake             ebb9@byu.net
-----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

iD8DBQFFRT9884KuGfSFAYARArRaAJ9yNNtasb0AQnICOTXdo7XS5cczrACgzuh9
ZWKrmILvJfn2zh9YfLIH4T8=
=uxHp
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]