This prints out each line's length, one number per line, so you can pipe this through sort and uniq (-c) to immediately see if something's wrong.perl -n -e 'print length . "\n"' file
and grep for your linelength. This command prepends the length and a ':' to each line.perl -n -e 'print length . ":$_"' file
Note that there is no space between the linenumber and "p". The last line would be '$' and the selection can be inverted by a '!' sign. So to print the whole file except for the last line do:sed -n Xp file
sed -n '$!p' file
perl -n -e '@t=split("\t");print $#t . "\n"' file
find /my/dir -type d -name log.\* -mtime +7 -print0|xargs -0 -r rm -Rf
echo -e "foobar-2.0.0.tar.gz\nfoobar-1.4.1.tar.gz\nfoobar-1.3.21.tar.gz\nfoobar-1.3.9.tar.gz" | \
perl -ne 'push @t,$_;END{print sort{@a=split/(\D)/,$a;@ab=(@a);@b=split/(\D)/,$b;
@bb=(@b);my$t=0;while(shift(@a)eq shift(@b)){$t++;}if(($ab[$t]=~/\d+/)&&($bb[$t]=~/\d+/)){
$ab[$t]<=>$bb[$t];}else{$ab[$t]cmp$bb[$t];};}@t}'
gives:
foobar-1.3.9.tar.gz foobar-1.3.21.tar.gz foobar-1.4.1.tar.gz foobar-2.0.0.tar.gz
/usr/X11R6/bin/gdk-pixbuf-query-loaders >gdk-pixbuf.loadersshould take care of that. Typical locations are:
openssl genrsa -des3 -out mykey.pem 2048
openssl rsa -in mykey.pem -pubout >mykey.pub
openssl dgst -sha1 -sign mykey.pem -out foo.sh.sha1 foo.sh
should give:openssl dgst -sha1 -verify mykey.pub -signature foo.sh.sha1 foo.sh
Verified OK