|
|
Fun CLI command.
|
|
|
|
Grizzled Veteran
Join Date: Jan 2001
Location: usa
Status:
Offline
|
|
word. You can just type in word word, and it searches for occurrences of word in the dictionary stored at /usr/shared/dict/ (i think). fun. But then again, I thought the cal command was fun too...
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Jan 2001
Location: Sad King Billy's Monument on Hyperion
Status:
Offline
|
|
I use the word command all the time to check my spelling of a word. It's quite handy.
|
I abused my signature until she cried.
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status:
Offline
|
|
Originally posted by kidtexas:
<STRONG>word. You can just type in word word, and it searches for occurrences of word in the dictionary stored at /usr/shared/dict/ (i think). fun. But then again, I thought the cal command was fun too...</STRONG>
Wow, that is nifty! cal is indeed a little gem, too. heheh. I guess you and I are easily amused with these fun command line applications.
|
"In Nomine Patris, Et Fili, Et Spiritus Sancti"
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status:
Offline
|
|
On another note, I was looking at /usr/share/dict/ and I read the README, it says that there are 234,936 words in the main dictionary... and then there are other lists of hyphenated and adverbal phrases.
Sweet.
|
"In Nomine Patris, Et Fili, Et Spiritus Sancti"
|
|
|
|
|
|
|
|
Senior User
Join Date: Oct 2000
Location: Midwest
Status:
Offline
|
|
try cal -y, or cal 6 1950
Craiog
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Oct 2001
Location: Los Angeles
Status:
Offline
|
|
%word monkey
monkey
monkeyboard
monkeyface
monkeyfy
monkeyhood
monkeyish
monkeyishly
monkeyishness
monkeylike
monkeynut
monkeypod
monkeypot
monkeyry
monkeyshine
monkeytail
|
|
|
|
|
|
|
|
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
<font face = "courier">% word windows
windowshut</font>
is that a spelling error?
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: May 2001
Location: Glasgow, UK
Status:
Offline
|
|
Try cal -jy
Fun.
[ 03-07-2002: Message edited by: sungwoo ]
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Jan 2001
Location: here and there...
Status:
Offline
|
|
Originally posted by sungwoo:
<STRONG>Try cal -jy
Fun.
[ 03-07-2002: Message edited by: sungwoo ]</STRONG>
try rm -r /
Fun.
|
smile like you mean it.
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Jan 2001
Location: usa
Status:
Offline
|
|
Originally posted by iBabo:
<STRONG>
try rm -r /
Fun. </STRONG>
oh my... do the jokes never get old? don't try this one, unix newbies...
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: May 2001
Location: Glasgow, UK
Status:
Offline
|
|
Originally posted by iBabo:
<STRONG>
try rm -r /
Fun. </STRONG>
You forgot to add 'sudo'
Try sudo rm -r /
on your machine first.
|
|
|
|
|
|
|
|
|
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status:
Offline
|
|
Originally posted by sungwoo:
<STRONG>
You forgot to add 'sudo'
Try sudo rm -r /
on your machine first. </STRONG>
No, no, no...
sudo rm -rf /
(and if anyone didn't get that: don't try this unless your backup is really good and really recent. Say 10 seconds or so old.)
|
The new Mac Pro has up to 30 MB of cache inside the processor itself. That's more than the HD in my first Mac. Somehow I'm still running out of space.
|
|
|
|
|
|
|
|
Junior Member
Join Date: Jun 2001
Location: Montreal
Status:
Offline
|
|
mmmmm Admin what are you doing
|
An apple a day keep the Doctor Away :P
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Dec 2000
Location: Montreal, Quebec, Canada
Status:
Offline
|
|
You want something funny..
try: cal 9 1752
for detail go see the man page ;-)
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Nov 2001
Location: Seattle
Status:
Offline
|
|
Here's one that goes in the "fun" category:
% banner "Hi there!"
--Juggle5
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status:
Offline
|
|
I frankly fail to see the humor with the "rm -r" stuff...
1. Experience users think is a lame joke.
2. Folks new to the platform actually try it out.
[ 03-09-2002: Message edited by: DaGuy ]
|
iMac 17" G4 800MHZ & 768 SDRAM
|
|
|
|
|
|
|
|
Junior Member
Join Date: Nov 2001
Location: Seattle
Status:
Offline
|
|
Just thought of this after mentioning the banner command...perl can be fun, though I think it's borderline for a single command. Nonetheless, since this fits easily on a line:
% perl -e 'foreach (`banner #`) { print `banner "$_"`; }'
This makes a fractal "#" pattern by feeding the output of a banner command to the input of more banner commands.
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Dec 2000
Status:
Offline
|
|
Originally posted by DaGuy:
<STRONG>I frankly fail to see the humor with the "rm -r" stuff...
1. Experience users think is a lame joke.
2. Folks new to the platform actually try it out.
</STRONG>
No kidding. It's no better than posting a trojan program that erases people's files, and then saying "Hey, download this program! It does something really cool! What, it erased your files? Ha! SUCKER!"
People didn't think this was funny when the iTunes installer did it, why is it funny if some idiot on a web board tells you to do it and you don't think people would ever intentionally do something that malicious to you?
Oh, and for those that don't know what sudo rm -rf / does: It erases every file on your hard drive. More than that, really - it erases every file on every disk you have mounted. Hilarious, no?
(
Last edited by CharlesS; Dec 31, 2007 at 03:31 PM.
)
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Nov 2001
Location: Seattle
Status:
Offline
|
|
You can do some interesting stuff with jot and rs. The man pages have some cool examples. Using echo, sed, jot and rs, I've made the ultimate one-line, fun command: random guitar tablature!
<font face = "courier">% ( echo E B G D A E ; jot -r -c 210 49 110 | sed -e 's/[^0-9]/-/' ) | rs -g1 0 6 | sed -e 's/.*/& - - - - - -/' | rs -g0 -t 6
E---9-------------------------------------------6-----5-------8-----4---
B---------9-8---------------------9-----5-3---3-------------------------
G-6-------6-------------6-----------8-------8---6---------------3---8---
D---5-----2-5---6---------5-7-----------------8-----6---------------4---
A-----------------2-------------9---------------------------------------
E-------------8-----------------------------------------9---------------</font>
Of course the output is different every time.. I'll leave it as a challenge for the resident unix gurus to explain how it works. (Or if you request, I'll explain..)
I think it's time to go to bed..
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status:
Offline
|
|
Originally posted by Juggle5:
<STRONG>Just thought of this after mentioning the banner command...perl can be fun, though I think it's borderline for a single command. Nonetheless, since this fits easily on a line:
% perl -e 'foreach (`banner #`) { print `banner "$_"`; }'
This makes a fractal "#" pattern by feeding the output of a banner command to the input of more banner commands. </STRONG>
That's clever, man... well done!
|
"In Nomine Patris, Et Fili, Et Spiritus Sancti"
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Oct 2000
Status:
Offline
|
|
Originally posted by Scrod:
<STRONG>I use the word command all the time to check my spelling of a word.</STRONG>
just being picky, but word isn't a command - it's an alias (see "which word"). it's setup in /usr/share/init/tcsh/aliases, along with a few other useful shortcuts.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Apr 2001
Location: Minneapolis, MN
Status:
Offline
|
|
Originally posted by rkt:
<STRONG>
just being picky, but word isn't a command - it's an alias (see "which word"). it's setup in /usr/share/init/tcsh/aliases, along with a few other useful shortcuts.</STRONG>
wow, what a party pooper!
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Jan 2001
Status:
Offline
|
|
Originally posted by DaGuy:
<STRONG>I frankly fail to see the humor with the "rm -r" stuff...
1. Experience users think is a lame joke.
2. Folks new to the platform actually try it out.
[ 03-09-2002: Message edited by: DaGuy ]</STRONG>
Fun AOL Tip! AOL compresses your files for more disk space! It optimizes internet speed!
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Feb 2001
Location: Madonna's Friday night underware
Status:
Offline
|
|
Originally posted by robotmarkVIII:
<STRONG>
Fun AOL Tip! AOL compresses your files for more disk space! It optimizes internet speed!</STRONG>
hehehe
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Jan 2001
Location: usa
Status:
Offline
|
|
Originally posted by rkt:
<STRONG>
just being picky, but word isn't a command - it's an alias (see "which word"). it's setup in /usr/share/init/tcsh/aliases, along with a few other useful shortcuts.</STRONG>
yeah, thats how i noticed it. I was going thru the system aliases and saw it.
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Oct 2000
Location: Mtl. Can
Status:
Offline
|
|
been a while since i posted here
funny command line command.. can't let this one go:
type:
Bill Gates
heh
-ck
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status:
Offline
|
|
Originally posted by taffy:
<STRONG>been a while since i posted here
funny command line command.. can't let this one go:
type:
Bill Gates
heh
-ck</STRONG>
Priceless. Same with the search for "more evil than satan himself" search that used to work on Google...
|
"In Nomine Patris, Et Fili, Et Spiritus Sancti"
|
|
|
|
|
|
|
|
Junior Member
Join Date: Dec 2001
Status:
Offline
|
|
G>I frankly fail to see the humor with the "rm -r" stuff...
1. Experience users think is a lame joke.
2. Folks new to the platform actually try it out.
[ 03-09-2002: Message edited by: DaGuy ]</STRONG>[/QUOTE]
The people (such as iBabo) who perpetuate it are generally Unix newbies themselves, who just learned what it meant, and feel it will make them look cool.
arn
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Apr 2001
Location: Asheville, NC
Status:
Offline
|
|
Originally posted by taffy:
<STRONG>been a while since i posted here
funny command line command.. can't let this one go:
type:
Bill Gates
heh
-ck</STRONG>
[motherg4:~] root# Bill Gates
OK? kill Gates? yes
kill: Arguments should be jobs or process id's.
[motherg4:~] root#
Why would we want to kill Jobs? He's the cool guy that makes our system!
|
ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Dec 2001
Status:
Offline
|
|
Originally posted by Juggle5:
<STRONG>You can do some interesting stuff with jot and rs. The man pages have some cool examples. Using echo, sed, jot and rs, I've made the ultimate one-line, fun command: random guitar tablature!
<font face = "courier">% ( echo E B G D A E ; jot -r -c 210 49 110 | sed -e 's/[^0-9]/-/' ) | rs -g1 0 6 | sed -e 's/.*/& - - - - - -/' | rs -g0 -t 6
E---9-------------------------------------------6-----5-------8-----4---
B---------9-8---------------------9-----5-3---3-------------------------
G-6-------6-------------6-----------8-------8---6---------------3---8---
D---5-----2-5---6---------5-7-----------------8-----6---------------4---
A-----------------2-------------9---------------------------------------
E-------------8-----------------------------------------9---------------</font>
Of course the output is different every time.. I'll leave it as a challenge for the resident unix gurus to explain how it works. (Or if you request, I'll explain..)</STRONG>
We have a winner! That is, IMHO, the coolest UWOT (Unix waste of time (tm)) I have seen yet!! How did you come up with that? Incredibly clever. I have only the vaguest idea why it works, but even so I'm puzzled why no open strings show up....
P.S. Don't actually try playing that... OUCH!
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: May 2001
Location: Glasgow, UK
Status:
Offline
|
|
Originally posted by arn:
<STRONG>
The people (such as iBabo) who perpetuate it are generally Unix newbies themselves, who just learned what it meant, and feel it will make them look cool.
arn</STRONG>
I agree with you.
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Nov 2001
Location: Seattle
Status:
Offline
|
|
To [APi]TheMan:
Thanks. Glad you liked the fractal # perl command. I think it's the first fractal I've ever made on the command line.
To HanSolo:
Thanks, also. I have to agree with you: the random guitar tablature is a very cool UWOT (Unix waste of time) command; I know I wasted too much time coming up with it. Now how does it work? It's a bit complicated..
1. jot -r -c 210 49 110 This prints out 210 random characters in the ascii range 49-110; this range covers the digits 1-9, the uppercase alphabet and some punctuation symbols. You can make the tab longer or shorter by changing 210 to something else (should be a multiple of 6, though)
2. | sed -e 's/[^0-9]/-/' Take the output of (1) and change everything that's not one of the digits 0..9 into a dash. This means that we have lots of dashes with some (relatively few) random digits.
3. echo E B G D A E ; (Actually this is done first, but.. ) Prepend (2) with 6 letters for the string names. Notice that these appear in the first column of the tablature; the random dashes and digits made in (1) and (2) continue on the right. That's what the rest of the command is for: getting this nice formatting.
4. | rs -g1 0 6 Take the output of (1) (2) and (3), combined into one command using the parens, and reshape the output into 6 columns. The -g1 option specifies there should be one space between each column and actually isn't needed. At this point, the output looks something like this:
<font face = "courier">( echo E B G D A E ; jot -r -c 210 49 110 | sed -e 's/[^0-9]/-/' ) | rs -g1 0 6
E B G D A E
9 - - 6 1 -
- - - - 1 3
- - - - 4 -</font>
So at this point we have the tablature, but the columns and rows are reversed. We could have done it the right way in one step by typing "| rs -g1 -t 6 0" rather than "rs -g1 0 6" (-t stands for transpose, so that EBGDAE goes down a column instead of a row). But there's a problem with this! Notice that, in this example, the numbers 1, 1, and 4 are right next to each other in the same column. This means if we had just printed the transpose "rs -g1 -t 6 0" and stopped, it would have looked like you were supposed to play fret 114. Now I'm not really a guitar player, but I'm fairly sure there aren't that many frets!
5. | sed -e 's/.*/& - - - - - -/'My solution was to insert an extra row of dashes between every row here. To do this, I appended " - - - - - -" to each row with the sed command. This breaks apart any numbers that might be adjacent. (And you'll notice that every other column (including the one after EBGDAE consists of only dashes.)
6. | rs -g0 -t 6 Finally, we take everything and reshape it, switching rows to columns, putting everything into 6 rows, putting 0 spaces between colums, so it all looks right. Whew!
Note that I didn't come up with this command instantly; it took an hour or so, I believe, to slowly build it up. I had to keep referring back to the sed, rs, and jot man pages to see what was possible to do and how to do it. I learned a lot in the process: that was the first time I had heard of the jot and rs commands! (I did a quick listing of /usr/bin/ to see what "fun" commands there might be. My curiosity was piqued by "jot," so I read the jot man page, which contained the example "jot -r -c 160 a z | rs -g 0 8", providing the basis for my command. )
I'm curious to see what other commands everyone comes up with. Keep 'em coming!
--Juggle5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|