Exit Pages: Debian Maintainer | Google | Linux | Debian


Regular Expressions:

A regular expression is a special text string for describing a text pattern. A regular expression can be used to search for a particular string in some file or can be used to search for set of files in a directory.

Sed,Grep and other text processors use regular expressions to perform desired operations.

You can go through the Regular expression manual.


Sed :

Sed is extremely powerful text processor using which you can do things that you can\'t do in any standard word processor. It is mainly used for searching a particular string and substituting it with some other string. But it is not like the Find/Replace option you see in any word processor. It is very advanced and very powerful tool. The search string in sed is a regular expression.

You can go through the Sed manual


Awk :

Its also a very powerful tool for data retrieval and processing.

Say for example you have a text file in which you have data in columns and you want the 5th column separately. Just think how will you get it. Using awk in a single command you can do that just write on the command prompt.

user@domain:~$ awk '{print $5}' < filename >

This command will give you only the data in the 5th column. It can also be used for doing arithmetic operations over columns. Take this example :

In a file you have the following data:
Varun 100 97 58
Kumar 84 72 93
Ganesh 72 92 89

The following command will give the sum of 2nd to 4th column for each person.
user@domain:~$ awk '{sum= $2+$3+$4;print $1,sum}' < filename >

Output will be :
Varun 255
Kumar 249
Ganesh 253

You can go through the Awk manual.


Gnuplot

Gnuplot is a command line driven plotting utility. It has lot of features including 2D and 3d plots. The best thing is it can be used in Python as well using the Gnuplot.py module.

Website: http://www.gnuplot.info/

Manual1: http://t16web.lanl.gov/Kawano/gnuplot/plot3d-e.html ----- #Its really good

Manual2: http://www.cs.uni.edu/Help/gnuplot/