[Top][All Lists]

[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 12:19:14 +1100

>In other words, IFS only affects the results of expansions, not literal
>text; words, in the sense of the shell grammar, are always delineated by
>unquoted space, tab, and newline, regardless of the IFS setting.

Thanks for an excellent explanation.

But maybe IFS really should have been named EFS?

Anyhow I see that bash has taken the liberty of changing
the traditional acronym expansion from "Input Field Separator" to
"Internal Field Separator".  A subtle difference.

But the word "Internal" isn't quite as good as "Expansion".

Anyhow, it is a pity that something like:

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

doesn't work.
It looks like it should work.

Also it might also be more convenient for aliasing.

If it wasn't for the fact that there is an ambiguity regarding multiline
command output which consists of a single line then it would be possible
to make a permanent distinction between multi-line command output (with
args separated by newlines and spaces escaped) and single line output
where spaces are not escaped.


reply via email to

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