Hello friends I am Deepak Saini and today we are discus about the scripting in red hat linux
Lets start
Script :- script is a collection of commands return on a prope order to execute a task threw a file.That is simple definition of a script
Setups or instructions
1 In that type of scripts which one i am present we are using .sh extension.
2 We are create a file like Deepak.sh in my case a test script
3 In My case i am using vi editor for edit my script
syntax :- vim <filename.sh>
4 In this file i am enter the some command like chmod or some other h show those in this image
5 after the insertion of the commands we are change the our file permissions and then execute it
syntax:- chmod 777 <scriptname>
if your noob in permission then read more here
6 Our script working properly and this is the method how we use some scripts in linux Red hat
7 We are able to write scripts in the Red Hat linux like perl,python and some other programing language
8 Finally how we are running this script
syntax :- ./<script name>
In this we are check all commands run properly with the help of the script
Working :-These scripts are working same how our commands but in those scripts the commands are running in serial and after on command the second command is execute automatically we are not type the command and press enter like this these scripts working like this how much i know i share about it .
Thanks for reading and sorry For my R.I.P english _/\ _ Jai Hind
Lets start
Script :- script is a collection of commands return on a prope order to execute a task threw a file.That is simple definition of a script
Setups or instructions
1 In that type of scripts which one i am present we are using .sh extension.
2 We are create a file like Deepak.sh in my case a test script
3 In My case i am using vi editor for edit my script
syntax :- vim <filename.sh>
4 In this file i am enter the some command like chmod or some other h show those in this image
5 after the insertion of the commands we are change the our file permissions and then execute it
syntax:- chmod 777 <scriptname>
if your noob in permission then read more here
6 Our script working properly and this is the method how we use some scripts in linux Red hat
7 We are able to write scripts in the Red Hat linux like perl,python and some other programing language
8 Finally how we are running this script
syntax :- ./<script name>
In this we are check all commands run properly with the help of the script
Working :-These scripts are working same how our commands but in those scripts the commands are running in serial and after on command the second command is execute automatically we are not type the command and press enter like this these scripts working like this how much i know i share about it .
Thanks for reading and sorry For my R.I.P english _/\ _ Jai Hind
0 comments:
Post a Comment