On Nov 18, 2008, at 10:07 AM, Brian McKee wrote:
> OTOH, if anyone has some suggestions on cleaning up this mongrel code
> that swaps BSD style md5 to GNU md5sum style checksums I'd appreciate
> it. (I am not a programmer, as you can probably tell) It works, but
> it looks horrible.
>
>> cat *.md5 | sed 's/[()]//g' | awk '{ print $4," ",$2 } ' | sed 's/
>> \+\</ /g' > $CHECKSUMFILE ;
>> md5sum -cv $CHECKSUMFILE ;
not sure this is particularly better, but it uses fewer pipes :)
cat *.md5 | perl -e 'while ( <> ) { chomp; /^MD5\s+\(([^)]+)\).*\s+
(\S*)$/ && print "$2 $1\n"; }' > $CHECKSUMFILE ;
md5sum -cv $CHECKSUMFILE ;
-steve
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---