by Satish Kumar | Jan 31, 2021 | BASH
Sometimes, waiting for a command to finish execution or ignoring commands until completion might not be considered a solid practice in scripting, though it does have applications: Where commands take variable lengths of time to complete (for example, pinging a network...
by Satish Kumar | Jan 30, 2021 | BASH
Another mechanism or component programs and scripts often use is called a lock file. It’s usually temporary (it resides in /tmp) and is sometimes used when multiple entities rely on a single source of data or need to know that other programs exist. Sometimes, it’s...
by Satish Kumar | Jan 29, 2021 | BASH
You have probably pressed Ctrl + C or Ctrl + Z without knowing what was occurring—it’s just like pressing Ctrl + Alt + Delete in another OS, right? Well, in one regard, yes—it is a signal, but the action itself is very different in Linux. A signal at the hardware...
by Satish Kumar | Jan 28, 2021 | BASH
Select works using a provided list (for example, it can be a wildcard selection for files) and will give you a list, such as: Select a file from the list: 1.) myfirst.file 2.) mysecond.file You chose: mysecond.file Clearly, a menu such as about is very trivial; it can...
by Satish Kumar | Jan 27, 2021 | BASH
One of the best practices for scripts (or programs, for that matter) is controlling user input, not only for security, but for controlling functionality in a way that input provides predictable results. For example, imagine a user who enters a number instead of a...