bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: sed bug?


From: Eli Zaretskii
Subject: Re: sed bug?
Date: Sun, 19 Feb 2012 23:15:44 +0200

> Date: Sun, 19 Feb 2012 11:59:02 -0700
> From: Bob Proulx <address@hidden>
> 
> > > So.  What does that mean?  It means that when programs are ported to
> > > MS the author doing the software port must make a decision.  They need
> > > to decide should they include code to expand arguments or not?
> > 
> > No, they don't: that code is linked in by default.
> 
> If so then why didn't Scott's case expand the file globs for him?

Because quoted wildcards aren't expanded.

> On MS are the quotes included in the command line option arguments
> too?

Yes.

> That's weird.  But in that case should he try this?
> 
>   sed -f x.sed "..\test files\"*.txt

Alas, this doesn't work, either, because the MS globbing code doesn't
support "foo"* in the sense that you expect, which is `leave "foo"
alone and expand the *'.

There simply isn't a good solution for the OP's problem, with the MS
globbing code.  A workaround is this:

  cd "..\test files\" && sed -f *.txt

(yes, MS shells understand "&&" nowadays).



reply via email to

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