All Tips


-2

Tip #495   Print Until Regular Expression

Print a file until a regular expression is matched.
Read more »

4

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:

7

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 »

6

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

2

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

3

Tip #488   Create a Sound File from a Text File

You can create a wav file from a written text using one of these command

Read more »
  • TAGS:

7

Tip #487   Print part of a file

Print the contents of a file from a given regular expression to another

Read more »

1

Tip #485   Check syntax of passwd and group files

Check correct syntax and file format of '/etc/passwd' and users existence

Read more »
  • TAGS: