public inbox for speakup@linux-speakup.org
 help / color / mirror / Atom feed
From: Tyler Spivey <tspivey8@home.com>
To: speakup@braille.uwo.ca
Subject: re: for command
Date: Sun, 23 Dec 2001 14:24:26 -0800	[thread overview]
Message-ID: <20011223222426.RRXR7324.femail13.sdc1.sfba.home.com@tspivey8> (raw)

an example: to tail all the files in the current directory,
you can do tail *, also:
for i in *; do tail $i;done
you can do (in bash):
help for
and it gives you:
for: for NAME [in WORDS ... ;] do COMMANDS; done
    The `for' loop executes a sequence of commands for each member in a
    list of items.  If `in WORDS ...;' is not present, then `in "$@"' is
    assumed.  For each element in WORDS, NAME is set to that element, and
    the COMMANDS are executed.
so,
for i in *.txt;do cat "testing" >>$i;done
would append "Testing" to the files in the current directory ending with .txt.
hope this helps.


             reply	other threads:[~ UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
 Tyler Spivey [this message]
 ` Saqib Shaikh

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=20011223222426.RRXR7324.femail13.sdc1.sfba.home.com@tspivey8 \
    --to=tspivey8@home.com \
    --cc=speakup@braille.uwo.ca \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).