Tip #564 Remove columns from text
'colrm' is a column removal filter.If only one parameter is specified, the characters of each line will be removed starting from that specified column number, if called with two parameters (range of character position to remove) the columns/characters from character position x to character position y will be removed.
Some examples:
Read more »
- TAGS:
- colrm
Tip #562 Version all unversioned files in an SVN checkout
Sometimes, you want to add a lot of files to SVN from the command line. This simple command will find all unversioned files in an SVN checkout and adds them to SVN versioning.Read more »
Tip #558 Being selfish - Kick all users except you
Kick all users other than you from your box and keep them out.Read more »
Tip #557 Randomize lines in a file
The bash shell has a variable called $RANDOM, which outputs a pseudo-random number every time you call it. This allows you to randomize the lines in a file for example:Read more »
Tip #554 Get your machines IP adress
You sometimes need your machines IP adress without relying on external sources; so here is the command to return your IP adress in one neat line.Read more »
- TAGS:
- grep
Tip #553 Remove duplicate files
The script below will find duplicate files (files with the same md5sum) in a specified directory and output a new shell script containing commented-out rm statements for deleting them. You can then edit this output to decide which to keep.Read more »
Tip #552 Using ssh as a generic stdin consumer and stdout producer
Many people use netcat on both the remote and local machine in order to transfer stdin and stdout to and from machines over the network, but many don't realize you can do the exact same thing using one line with SSH:Read more »
- TAGS:
- ssh
Tip #551 My code is compiling
Simulate a never-ending compilation so you have an excuse for why you're browsing the net (see http://xkcd.com/303/):Read more »
Tip #550 Go up n directory levels
You often see people using aliases like "alias ..='cd ..'" and "alias ...='cd ../..'". Here is a general version of this kind of '..' command, which takes an argument for how many levels up to go.Read more »
- TAGS:
- cd
Tip #549 Splitting arguments with read
The 'read' command can be used to split arguments based on any arbitrary character using IFS:Read more »
alias aptitude at awk bash bc cal cat cd colrm comm cp csh curl cut date dd df dialog diff dirname dpkg du fc find fuser grep gs gzip history iconv kill ksh last less ln ls lsof lynx m4 md5sum mkdir mkfifo mkisofs mv mysql nc netstat openssl OSX perl ping popd ps pushd python read redirection rm scp screen sed sort ssh stat sudo svn tail tar tee test top tr uniq vim wc wget xargs