[EMAIL PROTECTED] wrote: >> Take a look at the approach in the following example script. `recho' is >> part of the bash distribution; it's built while running the test suite. >> I used `ls -1' to create a newline-delimited list of filenames. >> >> $ cat x3 >> [ -d scratch ] || mkdir scratch >> cd scratch >> touch 'a b w' 'c d x' 'e f y' 'g h z' >> >> IFS=$'\n' >> recho $(ls -1 *) >> $ ../bash-3.2/bash ./x3 >> argv[1] = <a b w> >> argv[2] = <c d x> >> argv[3] = <e f y> >> argv[4] = <g h z> >> > > Easier is just: > > ls -1 * > > Why not give an example which effectively does "vi `grep -l PATTERN *`"? > Your example isn't of any use.
OK, one last try. Replace `recho' with `vi', and `ls -1' with `grep -l PATTERN'. Then take a deep breath and think about what the output of `recho' says about how the output of the command substitution was split. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Live Strong. No day but today. Chet Ramey, ITS, CWRU [EMAIL PROTECTED] http://cnswww.cns.cwru.edu/~chet/ _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash