Getting started with Bash Scripting

I am working on Ubuntu 16.04

Step 1: Editing the environment PATH variable to include the directory of our scripts.

Editing the PATH to include the directory of my scripts.
echo $PATH
Edit the .profile file (.bash_profile) PATH, to include the directory of your scripts. (file is in $HOME)
For temporary usage you can set the PATH with : export PATH=$PATH:directory
For user scripts there is bin directory in $HOME. If not create a bin directory in $HOME for your scripts.

.profile is loaded when we login, so we need to logout and login again for changes in .profile to take effect.

 

Step 2: Variables

 

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s