devel@ where you _can_ ask
 help / color / mirror / Atom feed
From: Afanasov Dmitry <ender@altlinux.org>
To: devel-newbies@lists.altlinux.org
Subject: Re: [newbies] передача параметров в awk ... или как по другому
Date: Sat, 6 Mar 2010 22:34:20 +0300
Message-ID: <20100306193417.GA4226@utvuk.ender.rk> (raw)
In-Reply-To: <20100306203333.458f19ca@HOMENET-MAIN.localdomain>

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

On Sat, Mar 06, 2010 at 08:33:33PM +0200, Vladimir A. Svyatoshenko wrote:
> for f in *
> do
>    tmp=`md5sum "$f" | awk '{print $1}'`
>    awk '{if($1 != $tmp) print $2}' ~/bookы.csv
> #  mv "$f" /mnt/hash/`md5sum "$f" | awk '{print $1}'`
> done
я б попробовал так:
find -type f -exec md5sum "{}" + | cut -d' ' -f1 | while read tmp; do awk -v tmp=tmp '{if($1 != tmp) print $2}' ~/books.csv

хотя что это за проверка: awk '{if($1 != $tmp) print $2}' ~/bookы.csv - мне
не понятно :)
-- 
 С уважением
 Афанасов Дмитрий

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

      parent reply	other threads:[~2010-03-06 19:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-06 18:33 Vladimir A. Svyatoshenko
2010-03-06 18:40   ` [newbies] Fwd: " Slava Semushin
2010-03-06 19:50     ` Vladimir A. Svyatoshenko
2010-03-06 18:41 ` [newbies] " Andrey Rahmatullin
2010-03-06 19:34 ` Afanasov Dmitry [this message]

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=20100306193417.GA4226@utvuk.ender.rk \
    --to=ender@altlinux.org \
    --cc=devel-newbies@lists.altlinux.org \
    /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

devel@ where you _can_ ask

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-newbies/0 devel-newbies/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 devel-newbies devel-newbies/ http://lore.altlinux.org/devel-newbies \
		devel-newbies@lists.altlinux.org devel-newbies@lists.altlinux.ru devel-newbies@lists.altlinux.com
	public-inbox-index devel-newbies

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


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