What's shell script
The command interpreter is the interface between the user and the operating system.Shell script is a program that is based on Linux bash command to manipulate the functionality of your server . it's based on bash command (Linux command) also you can used the environment variable that will facilitate detection like path, home user ...
In this example we see the role of the use the environment variable and command "pwd"
we can also make this little program as a command.
the beginning and end of each shell script program
To start your program you mast insert #!/bash/sh or #!/bash/bashthe "#!", is the name of a program which should be used to interpret the contents of the file and "exit 0" for exit program.
Condition
Like any program also in shell script you can use the conditionTo show a example https://github.com/boujeh/reseau.sh/blob/master/reseau.sh
the function
For example go to https://github.com/boujeh/distribution.sh/blob/master/distribution.sh
Environment variables
Environment variables are one way to influence the behavior of software on your system . For example, the environment variable " LANG" determines the language that the software uses to communicate with the user .To View Variable Value Type | BASH_VERSION | |
0 commentaires:
Post a Comment