Check These Out
bash.org is a collection of funny quotes from IRC.
WARNING: some of the quotes contain "adult" jokes... may be embarrassing if your boss sees them...
Thanks to Chen for the idea and initial version!
This script downloads a page with random quotes, filters the html to retrieve just one liners quotes and outputs the first one.
Just barely under the required 255 chars :)
Improvment:
You can replace the head -1 at the end by:
$awk 'length($0)>0 {printf( $0 "\n%%\n" )}' > bash_quotes.txt
which will separate the quotes with a "%" and place it in the file.
and then:
$strfile bash_quotes.txt
which will make the file ready for the fortune command
and then you can:
$fortune bash_quotes.txt
which will give you a random quote from those in the downloaded file.
I download a file periodically and then use the fortune in .bashrc so I see a funny quote every time I open a terminal.
This is useful when you want to copy a file and also force a user, a group and a mode for that file.
Note: if you want to move that file instead of copying it, you can use
$install -o user -g group -m 755 /path/to/file /path/to/dir/ && rm -f /path/to/file
which will remove the file only if the install command went fine.
This could be used to filter commands that might be from trolls
A null operation with the name 'comment', allowing comments to be written to HISTFILE. Prepending '#' to a command will *not* write the command to the history file, although it will be available for the current session, thus '#' is not useful for keeping track of comments past the current session.
ps returns all running processes which are then sorted by the 4th field in numerical order and the top 10 are sent to STDOUT.
Parallel is from https://savannah.nongnu.org/projects/parallel/
Other examples would be:
(echo foss.org.my; echo www.debian.org; echo www.freenetproject.org) | parallel traceroute
seq -f %04g 0 9999 | parallel -X rm pict{}.jpg
Replace 'csv_file.csv' with your filename.
Search for one/many words on commandlinefu, results in vim for easy copy, manipulation. The -R flag is for readonly mode...you can still write to a file, but vim won't prompt for save on quit.
What I'd really like is a way to do this from within vim in a new tab. Something like
$ :Tex path/to/file
but
$ :cmdfu search terms