Daniel Hill wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

So I was reading over the old archive of xkcd's blag, and found this:
http://blag.xkcd.com/2009/04/27/a-problem/
(read the comments lots of bash tips)

just wondering if anyone know's any neat tricks and what not for linux
I wrote this one the other day: WARNING THIS NEEDS ROOT
AND ASKS FOR IT (VIA SUDO), IT MAY NOT DESTROY YOUR
COMPUTER I'M WARNING YOU AND I HEAR BY CLAM NO
RESPONSIBILITY FOR DAMAGE CAUSED

it will also erase any file called "speed test.txt" in the current running
directory
<code>
FILE="speed tests.txt"; cp /dev/null "$FILE"; for i in `echo /dev/sd?
| sed "s:/dev/::g"` ; do LINE="Disk:/dev/$i "; LINE="$LINE "`sudo
hdparm -t /dev/$i | grep "Timing" | awk ' {... print $11 $12 } ' `;
LINE="$LINE "`sudo fdisk -l /dev/$i | grep "Disk /dev/$i" | awk '{
print $3 $4 }' | sed "s/,//g" `; echo $LINE >> "$FILE" ; done
</code>

- --
python -c "print \"\".join([
\"\x79\x71\x6Du\056vgp\x40ae\142nr\".decode(\"\x72o\164\x5F_13\")[i]
for i  in [1, 12, 9, 5, 13, 0, 4, 3, 5, 0, 0, 8, 11, 10, 7, 11, 9, 4,
9, 13, 6, 4, 9, 2] ] )"

http://www.facebook.com/YellowOnion
msnim:[email protected]
xmpp:[email protected]
http://last.fm/user/Yellow-Onion/
https://launchpad.net/~daniel-hill
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqVjlkACgkQGplaCYOFvyuFigCeJil8PJMYL3g8u33z/LFDF85k
4XwAni/fb8LNg5TAtEr7RlgpJiSCEmRv
=VOiP
-----END PGP SIGNATURE-----


For those who read the blag article, and wondered what that 'cowsay' pipeline near the end of the comments does:

$ cowsay "STACK OVERFLOW" | cowsay -n | cowsay -n | cowsay -n

______________________________________
/  __________________________________  \
| /  ______________________________  \ |
| | /  ________________            \ | |
| | | < STACK OVERFLOW >           | | |
| | |  ----------------            | | |
| | |         \   ^__^             | | |
| | |          \  (oo)\_______     | | |
| | |             (__)\       )\/\ | | |
| | |                 ||----w |    | | |
| | \                 ||     ||    / | |
| |  ------------------------------  | |
| |         \   ^__^                 | |
| |          \  (oo)\_______         | |
| |             (__)\       )\/\     | |
| |                 ||----w |        | |
| \                 ||     ||        / |
|  ----------------------------------  |
|         \   ^__^                     |
|          \  (oo)\_______             |
|             (__)\       )\/\         |
|                 ||----w |            |
\                 ||     ||            /
--------------------------------------
       \   ^__^
        \  (oo)\_______
           (__)\       )\/\
               ||----w |
               ||     ||
$




=======================================================================
This email, including any attachments, is only for the intended
addressee.  It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.
=======================================================================

Reply via email to