Gentoo Archives: gentoo-user

From: Willie Wong <wwong@×××××××××.EDU>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] One line script for md5sum
Date: Sun, 14 Dec 2008 00:59:15
Message-Id: 20081214005944.GA26158@princeton.edu
In Reply to: [gentoo-user] [OT] One line script for md5sum by Mick
1 On Sat, Dec 13, 2008 at 11:49:50PM +0000, Penguin Lover Mick squawked:
2 > Is there a clever way to enter a string (rather than write a script file) so
3 > that md5sum will check a whole series of files in one go and report success
4 > or error; I was thinking along the lines of if $value is ... then
5 > md5sum -c ..., but my non-existent scripting knowledge won't take me any
6 > further. I want it to check a series of files named tokena, tokenb,
7 > tokenc, ... , etc.
8 > --
9
10 Why not just a simple bash one-liner
11
12 for i in token{a..z}; do md5sum -c $i; done
13
14 AFAIK the md5sum will report success or failure for each of the
15 checksum lines in tokena, tokenb, etc.
16
17 If this doesn't suit your needs, can you describe in more detail your
18 desired behaviour?
19
20 W
21
22 --
23 (04:01:59) W: yep
24 (04:02:02) W: I love linux
25 (04:02:15) NJYWT: I love penguins
26 Sortir en Pantoufles: up 736 days, 23:38

Replies

Subject Author
Re: [gentoo-user] [OT] One line script for md5sum Neil Bothwick <neil@××××××××××.uk>