zsh-users
 help / color / mirror / code / Atom feed
From: Szekeres Istvan <szekeres@rusalka.fornax.hu>
To: zsh-users@math.gatech.edu
Subject: Re: Is this possible/easy?
Date: Mon, 3 Mar 1997 17:39:44 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.3.95q.970303173821.28635F-100000@rusalka.fornax.hu> (raw)
In-Reply-To: <Pine.SUN.3.95.970303081256.25410A-100000@kira>


On Mon, 3 Mar 1997, Timothy Luoma wrote:

> for i in [000 - 255]
> do
>       ping 150.121.555.$i
> done
>
> but I've tried all sorts of brackets and can't get it to work.  Anyone
> know?  I could really use this with some other scripts too

what about reading some manual? :)

man zshexpn->

       An expression of the form {n1..n2}, where n1  and  n2  are
       integers,  is  expanded to every number between n1 and n2,
       inclusive.  If either number begins with a zero,  all  the
       resulting  numbers  will  be padded with leading zeroes to
       that minimum width.  If  the  numbers  are  in  decreasing
       order  the  resulting  sequence will also be in decreasing
       order.

so....


for i in {1..254}; do
        ping -c 1 150.121.555.$i
done



Pista




  reply	other threads:[~1997-03-03 16:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-03 16:06 Jason Price
1997-03-03 16:16 ` Timothy Luoma
1997-03-03 16:39   ` Szekeres Istvan [this message]
1997-03-03 16:40   ` Clint Adams
     [not found]   ` <luomat@peak.org>
1997-03-03 17:24     ` Bart Schaefer
1997-03-03 16:49 ` Zefram
1997-03-04 12:18 ` gwing
1997-03-15 12:07 ` Hendrik Visage

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.3.95q.970303173821.28635F-100000@rusalka.fornax.hu \
    --to=szekeres@rusalka.fornax.hu \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).