bash

...now browsing by tag

 
 

Funny Linux Commands

Monday, February 23rd, 2009

Hope you enjoy these humorous commands. Go ahead and try them, they really do work.

% cat "food in cans"
cat: can't open food in cans

% nice man woman
No manual entry for woman.

% "How would you rate Quayle's incompetence?
Unmatched ".

% Unmatched ".
Unmatched ".

% [Where is Jimmy Hoffa?
Missing ].

% ^How did the sex change operation go?^
Modifier failed.

% If I had a ( for every $ the Congress spent, what would I have?
Too many ('s.

% make love
Make: Don't know how to make love. Stop.

% sleep with me
bad character

% got a light?
No match.

% man: why did you get a divorce?
man:: Too many arguments.

% !:say, what is saccharine?
Bad substitute.

% %blow
%blow: No such job.

% \(-
(-: Command not found.

$ PATH=pretending! /usr/ucb/which sense
no sense in pretending!

$ drink matter
matter: cannot create

A Little Netstat Bash Script

Wednesday, July 16th, 2008

Just a script to run netstat continuously for 5 minutes. I know you can run it with the -c option, but it sure is ugly and hard to keep up with everything as it scrolls by. this script clears the screen and runs netstat -ant again every second to give it output similar to top. I set it to stop after 5 minutes because we don’t want it to be a runaway process if we forget about it. I figure if I’m actually watching it for 5 minutes, it won’t kill me to hit the up arrow and the enter key to restart it.

#!/bin/bash
#
# Written by Kammouflage
# http://blog.kameronkenny.com
#
# You may copy, distribute, modify... basically
#do whatever the hell you want to with this
#as long as you leave my name, web site and
#this little message with the script

COUNTER=0

#change 300 to whatever you want to lengthen or shorten the time

while [ $COUNTER -lt 300 ]; do
clear
netstat -ant
sleep 1
let COUNTER=COUNTER+1
done