by infra xpertzz | Feb 7, 2021 | Shell Scripting
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...
by infra xpertzz | Feb 5, 2021 | Shell Scripting
REPETITIVE TASKS & VARIABLES 5.1. FOR loop How does it work? The for loop is the first of the three shell looping constructs. This loop allows for specification of a list of values. A list of commands is executed for each value in the list. The syntax for this...
by infra xpertzz | Feb 3, 2021 | Shell Scripting
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...
by infra xpertzz | Feb 3, 2021 | Shell Scripting
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...
by infra xpertzz | Feb 3, 2021 | Shell Scripting
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...