Shell Scripting Tutorial – Part 6

FUNCTIONS & SIGNALS 6.1. Signals Finding the signal man page Your system contains a man page listing all the available signals, but depending on your operating system, it might be opened in a different way. On most Linux systems, this will be man 7 signal. When in...

Shell Scripting Tutorial – Part 4

 CONDITIONS & INTERACTIVE SCRIPTS 4.1. IF clause General At times you need to specify different courses of action to be taken in a shell script, depending on the success or failure of a command. The if construction allows you to specify such conditions. The most...

Shell Scripting Tutorial – Part 3

GNU 3.1. Interactive editing What is sed? A Stream Editor (sed) is used to perform basic transformations on text read from a file or a pipe. The result is sent to standard output. The syntax for the sed command has no output file specification, but results can be...

Shell Scripting Tutorial – Part 2

BASH ENVIRONMENT 2.1. Initialization System-wide configuration files /etc/profile When invoked interactively with the –login option or when invoked as sh, Bash reads the /etc/profile instructions. These usually set the shell variables PATH, USER, MAIL, HOSTNAME...