[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Spaces in args, escapes, and command substitution
From: |
bash |
Subject: |
Re: Spaces in args, escapes, and command substitution |
Date: |
Mon, 30 Oct 2006 01:18:43 +1100 |
>According to bash@zacglen.com on 10/29/2006 5:56 AM:
>>> This also works.
>>>
>>> find . -exec grep -q PATTERN {} \; -exec vi {} \;
>>>
>>
>> No it doesn't because it issues a fresh instance of vi per file.
>
>Then use the POSIX-specified:
>find . -exec grep -q PATTERN {} \; -exec vi {} +
>
>That will execute grep once per file, then aggregate the successful
>matches into a single invocation of vi (assuming you don't exceed ARG_MAX
>limits), properly accounting for spaces in filenames.
>
But, given that find is clever enough to assemble arguments containing
spaces into an arglist and feeding them to vi, why can't bash?
Regards
Bahser
- Re: Spaces in args, escapes, and command substitution, (continued)
- Re: Spaces in args, escapes, and command substitution, bash, 2006/10/24
- Re: Spaces in args, escapes, and command substitution, bash, 2006/10/28
- Re: Spaces in args, escapes, and command substitution, Eric Blake, 2006/10/29
- Re: Spaces in args, escapes, and command substitution, bash, 2006/10/29
- Re: Spaces in args, escapes, and command substitution, Eric Blake, 2006/10/29
- Re: Spaces in args, escapes, and command substitution, bash, 2006/10/29
- Re: Spaces in args, escapes, and command substitution, Bob Proulx, 2006/10/29
- Re: Spaces in args, escapes, and command substitution, Bob Proulx, 2006/10/29
- Re: Spaces in args, escapes, and command substitution, bash, 2006/10/29
- Re: Spaces in args, escapes, and command substitution, Eric Blake, 2006/10/29
- Re: Spaces in args, escapes, and command substitution,
bash <=
- Re: Spaces in args, escapes, and command substitution, Bob Proulx, 2006/10/29
- Re: Spaces in args, escapes, and command substitution, bash, 2006/10/29
- Re: Spaces in args, escapes, and command substitution, Eric Blake, 2006/10/29
- Re: Spaces in args, escapes, and command substitution, bash, 2006/10/29
- Re: Spaces in args, escapes, and command substitution, Bob Proulx, 2006/10/29
- Re: Spaces in args, escapes, and command substitution, Chet Ramey, 2006/10/29
- Re: Spaces in args, escapes, and command substitution, bash, 2006/10/29
- Re: Spaces in args, escapes, and command substitution, Chet Ramey, 2006/10/29
- Re: Spaces in args, escapes, and command substitution, bash, 2006/10/29
- Re: Spaces in args, escapes, and command substitution, Eric Blake, 2006/10/29