July 2017
Beginner
208 pages
3h 7m
English
Here is an example of a very simple script. It might not look like much but this is the basis for every script:
#!/bin/sh # # 03/27/2017 # exit 0
By convention, in this book the script lines will usually be numbered. This is for teaching purposes only, in an actual script the lines are not numbered.
Here is the same script with the lines numbered:
1 #!/bin/sh 2 # 3 # 03/27/2017 4 # 5 exit 0 6
Here is an explanation for each line:
/bin/sh is actually a symbolic link to the interpreter.# are comments. Also, anything after a # is also treated as a comment.Read now
Unlock full access