Simple BASH programming tutorials using Fedora 22
- In Bash programming, all the user written scripts has to be run using some commands infront of the script name if the script execute permission is not set to the user and also the path of the script should be in the $PATH global variable.
- There fore before executing the scripts i'm going to set these path variable and change the user permission. For this i will get the below mentioned script name as an example.
- To change the Permission
- chmod u+x oddeven
- To change the Path
- PATH=$PATH:/home/<User>/<directory path containing the script>
So the first Image will be the Script and the second will be the output of it.
Script 1:
Script 2:
Script 3:
Script 4:
This is the text file which used by the Script 4 to change directories.(filelist.txt)
Comments
Post a Comment