By including the script path in the environment variable PATH, you can run your shell script just like any UNIX command. i.e., irrespective of your current location you can run the script with just script name.
Example:
volcano@volcano-laptop:~$ PATH=$PATH:/home/volcano/shellscript
volcano@volcano-laptop:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:.:/home/volcano/shellscript
volcano@volcano-laptop:~$ hello.sh
Hello World!
Sujay,
ReplyDeleteInclude find/searche related unix command and shell script.
Most of the people using these stubs frequently.
Like how to search a string in a very large text file using vi editor.
Hi Sujay,
ReplyDeleteYou make blogging seem easy. The total look of your site is amazing.
Thank & Regards
Elena Lauren
nice post, thank you for sharing
ReplyDeletedevops online training