md5(1) and cal(1)
Chad Perrin
perrin at apotheon.com
Tue May 11 03:17:16 UTC 2010
On Mon, May 10, 2010 at 05:35:45PM -0800, David Allen wrote:
> 1. Why doesn't cal(1) hilight the current day? Hell, some days I'm
> not even sure what day or week it is, so after typing 'cal', I have to
> type in 'date', and then sit there for a few seconds to interpret what
> I'm looking at. Of course, that isn't always successful, so I
> typically end up reaching for my mouse and hilight the date manually.
> But after doing that I'm just as annoyed by not knowing the date as
> I'm annoyed by the behavior of the cal utility and the extra work I'm
> forced to do.
If I don't actually know the date, I typically use the date command to
find out. I use cal to do things like check dates of other days in the
preceding or following weeks.
>
> 2. Why doesn't md5(1) have a "check" option? Seems to me requiring a
> manual inspection is error-prone at best, and makes scripting unecessarily
> complicated.
I use diff to check the output of md5 against a known string. For
instance, if I have a known hash value in a file hash.txt, I might first
get the md5 output into another file called hash2.txt:
md5 -q hash2.txt
. . . then diff the two files:
diff hash.txt hash2.txt
The thing that bothers me about diff is that, even though it's often
described as a "string comparison" utility, it doesn't actually compare
strings -- it compares files that *contain* strings.
--
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100511/70365ebc/attachment.pgp
More information about the freebsd-questions
mailing list