Re: cat problem

From: Stephane CHAZELAS (this.address_at_is.invalid)
Date: 11/07/04


Date: 07 Nov 2004 19:12:45 GMT

2004-11-7, 18:12(+00), Weiguang Shi:
> Thanks for the help!
>
> Stephane CHAZELAS wrote:
>>Note that with zsh, you don't need seq.
>>
>>for i in {1..9}
> Nice albeit incompatible.
[...]

Should be compatible with any reasonably recent version of zsh
and with bash versions 3.0 or above.

On the other hand, seq works only on GNU systems.

>>for ((i=1; i<=9; i++))
[...]

That one works with zsh, ksh93 and bash 2.04 or above.

-- 
Stephane


Relevant Pages

  • Re: Getting the other file ...
    ... 2004-07-22, 10:07, Stephane CHAZELAS: ... > (or bash or zsh). ... > That doesn't work if that other file is a dot file. ...
    (comp.unix.shell)
  • Re: spaces to underscores
    ... On Tue, 30 Jan 2007 15:09:41 GMT, Stephane CHAZELAS ... I'm using bash right now. ... I hadn't heard of zsh. ... legitimate and not spam-trapped. ...
    (comp.unix.shell)
  • Re: Reintroducing fish, the friendly interactive shell
    ... Or with zsh -o csh_null_glob ... In rm *(seq 1 12).jpg, ... No, none, but no shell supports CIFS, so you're free to do it as ... very dangerous to me (if you intend to write fish scripts). ...
    (comp.unix.shell)
  • Re: spaces to dashes with exception
    ... Stephane Chazelas wrote: ... that's amazingly succinct and accurate. ... possible in bash? ... I just don't have any experience with zsh, ...
    (comp.unix.shell)
  • Re: Request for Comments -- shell features and documentation
    ... > As you know, I've been adding to Bash many useful features from Awk, ... > Python, Zsh, and Ksh, and other things that you probably never heard of. ... > If command substitution string begins with '..', ...
    (comp.unix.shell)