Re: sed bug?

Pierre Gaston <[email protected]>
Newsgroups gmane.comp.gnu.utils.bugs
Message-ID <CAPSX3sSryhLF2-O73UwgpxHoKWHdoqdByRT3iV-tZDhjjE2CMg@mail.gmail.com>
On Sat, Feb 18, 2012 at 12:02 AM, Scott Hall <[email protected]> wrote:

> I'm using your sed utility and am having a problem with handling a list of
> input files.
>
> If I include quotes around the input path (which I need if there is a
> space in the path), it results in an "Invalid Argument" error.
>
> example:
> sed -f x.sed "..\test files\*.txt"
> sed: can't read ..\test files\*.txt: Invalid argument
>

sed isn't the one doing the expansion of *.txt to a list of filenames, it
is your shell. Then when sed runs it sees a list of filenames passed as
arguement.

If you put *.txt   inside quotes you tell the shell not to expand this list
and sed receives a literal *.txt that it can't interpret.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.