Thursday, June 12, 2008

What do you mean by Sourcing in Shell Scripting

Executing commands in current shell without opening a new shell to execute the commands.

eg:
vjsujay@linuxdemon$source sample.sh
or
vjsujay@linuxdemon$. sample.sh #dot(.) should be separated by a space(s)

Two main objective of sourcing:
1.) Exporting the common variables file in the current shell, when required.
2.) Exporting the reusable functions file in the current shell, when required.

Wednesday, June 11, 2008

What is Shell Script

A shell script is a sequence of Unix/Linux command(s) in a file and then execute the file as a command.