Re: New option for md5sum (original) (raw)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
From: | Pádraig Brady |
---|---|
Subject: | Re: New option for md5sum |
Date: | Sat, 19 Apr 2014 09:56:36 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 04/19/2014 08:58 AM, Andreas Schwab wrote:
Bernhard Voelker <address@hidden> writes:
> On 04/19/2014 04:48 AM, Bob Proulx wrote: >> Rather than cut and using an exact number of characters I prefer to >> use awk to cut by fields. That way it works with all of the *sum >> programs. >> >> $ md5sum /dev/null | awk '{print$1}' > > And there are many other ways: > > # using the field option of cut: > $ md5sum /dev/null | src/cut -d ' ' -f 1 > d41d8cd98f00b204e9800998ecf8427e > > $ md5sum /dev/null | sed 's/ .*$//' > d41d8cd98f00b204e9800998ecf8427e
None of them handle quoted file names:
$ md5sum a\b | awk '{print$1}' \d41d8cd98f00b204e9800998ecf8427e
The first proposed option using indirection does. If that's awkward from a programmatic context, then in such a context it would be trivial (albeit not obvious) to strip.
Pádraig.
- New option for md5sum, djcj, 2014/04/18
- Re: New option for md5sum, Pádraig Brady, 2014/04/18
* Re: New option for md5sum, Bob Proulx, 2014/04/18
* Re: New option for md5sum, Bernhard Voelker, 2014/04/19
* Re: New option for md5sum, Andreas Schwab, 2014/04/19
* Re: New option for md5sum,Pádraig Brady <=
- Re: New option for md5sum, Pádraig Brady, 2014/04/18
- Prev by Date:Re: New option for md5sum
- Next by Date:[PATCH] maint: make ChangeLog generation more robust
- Previous by thread:Re: New option for md5sum
- Next by thread:[PATCH] maint: make ChangeLog generation more robust
- Index(es):