Bash Shell Scripting links and References

By | February 27, 2011

Here is a list of articles that should be saved for further reference.

1: Linux Most important Files and Directories.

2: Linux VARIABLES:

$$ = The PID number of the process executing the shell.
$? = Exit status variable.
$0 = The name of the command you used to call a program.
$1 = The first argument on the command line.
$2 = The second argument on the command line.
$n = The nth argument on the command line.
$* = All the arguments on the command line.
$# The number of command line arguments.

3: Setting default editor in bash shell.

export EDITOR=”vim”

4: FSTAB explained.

5: CRONTAB Explained.

6: Filesystem definition.

7: Bash if CONDITION.

8: Bash for loop.

9: Using Printf in bash.

In computing, a file system (often also written as filesystem) is a method of storing and organizing computer files and the data they contain to make it easy to find and access them.

10: Replace a word or a pattern with another word or pattern in all files in a directory. Lets say we have 5 files in a directory and almost all files have a word “PRESENT-SYNTAX” and you want to replace it with “NEWSYNTAX” then we use following command. Make sure to get into the corresponding directory before running the command.

sed -i “s/PRESENT-SYNTAX/NEWSYNTAX/g” *

If you like this article, then please consider sharing it. Sharing really inspires us to do things much better!!

Leave a Reply

Your email address will not be published. Required fields are marked *