Tip #495 Print Until Regular Expression
Print a file until a regular expression is matched.Read more »
Tip #493 Process Substitution
This trick allows you to use a process *almost* anywhere you can use a file. To illustrate, let's consider the diff command. Most versions of diff require you to pass exactly two file names as arguments. But what if we want to diff something, like the contents of a directory, that doesn't necessarily exist in a file? This is where we can use process substitution. For example, to diff the contents of two directories, you could use:Read more »
- TAGS:
Tip #492 Moving large directories
Why not use cp or mv to move /usr/home to /storage/export/home? Weird things happen to hard and softlinks when you mv or cp. Try it and remember that a mv between different filesystems is actually a copy and delete.Try this instead: Read more »
- TAGS:
- tar
Tip #491 Shell alarm clocks
To setup a simple reminder to appear on your screen at a set time you can use xmessage with the 'at' command:Read more »
- TAGS:
- at
Tip #490 Simple Templates with m4
The m4 command is designed specifically for macro processing. m4 manipulates files, performs arithmetic, has functions for handling strings, and can do much more.Here's a quick example of using m4 with templates: Read more »
- TAGS:
- m4
Tip #488 Create a Sound File from a Text File
You can create a wav file from a written text using one of these commandRead more »
- TAGS:
Tip #487 Print part of a file
Print the contents of a file from a given regular expression to anotherRead more »
- TAGS:
- sed
Tip #485 Check syntax of passwd and group files
Check correct syntax and file format of '/etc/passwd' and users existenceRead more »
- TAGS:
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