ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Artem K. Jouravsky" <tema@sema.ru>
To: community@altlinux.ru
Subject: Re: [Comm] три вопроса по bash
Date: Fri, 9 Apr 2004 11:33:18 +0400
Message-ID: <20040409073318.GF7915@ujo.office.sema.ru> (raw)
In-Reply-To: <19667455325.20040409095633@dfp.gov.ua>

[-- Attachment #1: Type: text/plain, Size: 859 bytes --]

On Fri, Apr 09, 2004 at 09:56:33AM +0300, pioneer@bigmir.net wrote:
> Вопрос 1.
> Имеется файл-список с неким перечнем файлов, по одному в каждой строчке.
> Хочется над каждым из этих файлов провести операцию - выполнить
> некую программу:
> someprogram /path/to/file
for i in `cat /path/to/file`;do command1; command2; done

> Вопрос 2.
> Весь вывод предыдущей операции (как stdout, так и stderr) вывести как
> на экран, так и в какой-нибудь лог-файл.
см. tee(1)
> Вопрос 3.
> Вопрос 3 есть усложнение задачи вопроса 1. С целью повышения удобства
> хочется отфильтровать из вышеупомянутого файла-списка строчки,
> начинающиеся на символ комментария #.
for i in `grep '^[^#]' /path/to/file`;do command1; command2; done

--
С уважением,
   Артём.
ЗАО "СЕМА.РУ"
************
"It's not just a computer -- it's your ass."
		-- Cal Keegan

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2004-04-09  7:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-09  6:56 pioneer
2004-04-09  7:28 ` [Comm] Q: To bash or not to bash (was: три вопроса по bash) Alexey Morozov
2004-04-09  8:26   ` Alexander Leschinsky
2004-04-09  9:15     ` Alexey Morozov
2004-04-09  9:02   ` Alexey I. Froloff
2004-04-09  9:09     ` Alexey Morozov
2004-04-09  7:33 ` Artem K. Jouravsky [this message]
2004-04-09  8:22   ` Re[2]: [Comm] три вопроса по bash Alexander Leschinsky
2004-04-09  7:38 ` Maxim Tyurin
2004-04-09 10:10   ` [pioneer]
2004-04-09 10:18     ` Alexey Morozov

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=20040409073318.GF7915@ujo.office.sema.ru \
    --to=tema@sema.ru \
    --cc=community@altlinux.ru \
    /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

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git