Re: Bash/Zsh brace expansion; Re: [plug] clone files - incre…

Top Page
Attachments
Message as email
+ (text/plain)
Author: Mark O'Shea
Date:  
To: plug
Subject: Re: Bash/Zsh brace expansion; Re: [plug] clone files - increment name
On Mon, Sep 01, 2008 at 12:30:10PM +0800, Alastair Irvine wrote:
>
> > cat /etc/debian_version
> 3.1
> > bash -c 'for i in {1..10} ; do echo $i ; done'
> {1..10}
>
> As mentioned by Daniel Pittman in a later reply, this isn't
> supported at all by shells other Bash and Zsh. (pdKSH anyone?)


pdksh, ksh on solaris or *bsd, old style bourne shell, dash etc:
for i in `seq 1 10` ; do echo $i ;done

Also it works on bash. Bashisms would be nice if they worked elsewhere
but then they wouldn't be bashisms. They're almost as bad as using c
shell...

Mark
_______________________________________________
PLUG discussion list: plug@???
http://www.plug.org.au/mailman/listinfo/plug
Committee e-mail: committee@???