9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Skip Tavakkolian <9nut@9netics.com>
To: 9fans@9fans.net
Subject: Re: [9fans] How to take a portion of a screenshot
Date: Wed, 23 Nov 2016 23:23:32 -0800	[thread overview]
Message-ID: <97656692bebbbd2cb90db65b7954ad1a@9netics.com> (raw)
In-Reply-To: <6D3B924C-6701-4345-8768-98D7927DD9DD@gmail.com>

> * I can’t seem to find a way to have an incrementing loop counter in rc shell (best I could do is check the size of a growing list variable)

most of the time seq(1), hoc(1) and similar tools can help do the job:

fn square {
	echo $1 '*' $1 | hoc
}

for (i in `{seq 1 10}) {
	j = `{square $i}
	echo $i^² '=' $j
}


> * I couldn’t think of a good way to name the image files so that they can be sorted into the correct sequence as input to togif

awk printf perhaps?

for (i in (0 10 100)) {
	echo $i
} | awk '{printf "image_%0.3d\n", $0}'




  reply	other threads:[~2016-11-24  7:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23 12:28 Chris McGee
2016-11-23 15:34 ` Adriano Verardo
2016-11-23 16:06 ` Richard Miller
2016-11-23 16:28   ` hiro
2016-11-23 18:39   ` Chris McGee
2016-11-23 20:07     ` Skip Tavakkolian
2016-11-23 20:31       ` Benjamin Purcell
2016-11-23 20:36         ` James A. Robinson
2016-11-23 20:41           ` hiro
2016-11-23 20:56             ` Skip Tavakkolian
     [not found]               ` <CAEVxPTOrWFf2hd-nWDeP8GE5qSjhqB6Ox=W1C9FhrVt9S70V-g@mail.gmail.com>
     [not found]                 ` <CAEVxPTP5L2=SpYEn96QUpsZ1VDjUwTKUzxCNp+WVoJqVCDocvg@mail.gmail.com>
2016-11-23 21:30                   ` Jules Merit
2016-11-23 21:57                     ` Steve Simon
2016-11-23 22:16                       ` Jules Merit
2016-11-28  6:30                     ` erik quanstrom
2016-11-23 20:48           ` Skip Tavakkolian
2016-11-24  5:06       ` Chris McGee
2016-11-24  7:23         ` Skip Tavakkolian [this message]
2016-11-24  8:56         ` cinap_lenrek
2016-11-26  4:23           ` Chris McGee
2016-11-26  7:27             ` Skip Tavakkolian

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=97656692bebbbd2cb90db65b7954ad1a@9netics.com \
    --to=9nut@9netics.com \
    --cc=9fans@9fans.net \
    /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.
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).