Click Link
Shell , Bash
Bash Guide for Beginners - Free Online manual's and tips - Shell Start - Shell console - Shell Bash Guide Look Up !! Click Link
LDP Project Info
LDP autor guide - Free linux manual's download help ? You also can add you work !!!!Click Link
Linux Porting Guide
Internet Security , Linux porting guide , block forward ports - Linux manage guide network administrator Online manual securityClick Link
Optimizing Linux
Linux security optimizing linux internet security free ebook security tips and guide linux network security administrator e-book optimizationClick Link
Linux Documentation
The linux programmer's guide , linux programming free e-book and documentation download manual

2.1. Invoking the script

Having written the script, you can invoke it by sh scriptname, [1] or alternatively bash scriptname. (Not recommended is using sh <scriptname, since this effectively disables reading from stdin within the script.) Much more convenient is to make the script itself directly executable with a chmod.

Either:

chmod 555 scriptname (gives everyone read/execute permission) [2]

or

chmod +rx scriptname (gives everyone read/execute permission)

chmod u+rx scriptname (gives only the script owner read/execute permission)

Having made the script executable, you may now test it by ./scriptname. [3] If it begins with a "sha-bang" line, invoking the script calls the correct command interpreter to run it.

As a final step, after testing and debugging, you would likely want to move it to /usr/local/bin (as root, of course), to make the script available to yourself and all other users as a system-wide executable. The script could then be invoked by simply typing scriptname [ENTER] from the command line.

Notes

[1]

Caution: invoking a Bash script by sh scriptname turns off Bash-specific extensions, and the script may therefore fail to execute.

[2]

A script needs read, as well as execute permission for it to run, since the shell needs to be able to read it.

[3]

Why not simply invoke the script with scriptname? If the directory you are in ($PWD) is where scriptname is located, why doesn't this work? This fails because, for security reasons, the current directory is not by default included in a user's $PATH. It is therefore necessary to explicitly invoke the script in the current directory with a ./scriptname.

Need free clipart , graphic arts to your web or documents look at pages listed below :