[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cksum RFE
From: |
James Youngman |
Subject: |
Re: cksum RFE |
Date: |
Fri, 29 Jul 2005 09:14:39 +0100 |
User-agent: |
Mutt/1.5.9i |
On Thu, Jul 28, 2005 at 08:36:51PM -0700, Dave Yost wrote:
> There should be options a la wc to select which of the three columns
> of output you want, the sum, the size, and/or the name.
>
> cksum --sum
>
> is what you want when you're using it in a script. Otherwise you
> have to mess with the output to extract just the sum.
Well, you're already processing the output if you have a script. It's
not really the Unix way to wantonly add extra options to commands when
it's so simple just to parse the output as-is:
set x $(cksum < /bin/sh)
sum=$2
blocks=$3
... and there are probably at least another six ways to do it in the
shell. This is the whole point of the "almost everything is a text
file really" concept.
Regards,
James.
- cksum RFE, Dave Yost, 2005/07/29
- Re: cksum RFE,
James Youngman <=