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

Re: POSIX scripting tip

On Tue 03 Oct 2000, Philip Brown wrote:

> > 	cp verylongfilename{,.orig}
> I'm taking about scripting specifically. What you give as an example is
> something you'd do on the command line.


As I wrote in my first message in this thread:

: OTOH, I agree that avoiding such things is
: generally a good idea (esp. in scripts where saving a couple of
: keystrokes isn't that important), however for interactive work
: it's a pretty nifty feature.

> Anyways, since you bring up that sort of thing, I thought I'd mention
> something folks dont often know about: POSIX SH supports something vaguely
> similar to   {,} notation in CSH.
>  [Not the odd "file isnt there yet" syntax of bash you give above.
>   I consider that a BUG, not a feature]

A bug in POSIX SH?
The feature in bash is *not* globbing. hence nothing to do with files
that are or are not there.

> $ ls fifty?(one|f*)

Hmm.. At least I've learnt something in this thread :-)

Paul Slootman
home:       paul@wurtel.demon.nl http://www.wurtel.demon.nl/
work:       paul@murphy.nl       http://www.murphy.nl/
debian:     paul@debian.org      http://www.debian.org/
isdn4linux: paul@isdn4linux.org  http://www.isdn4linux.org/

Reply to: