Bash
Articles in this category.
- Bash for loops and the find -exec alternative — Practical shell one-liners (killing processes, lsof) plus a refresher on for loops, ranges, tcsh foreach and find -exec.
- Bash: if conditions, test operators and case — Bash conditions cheat sheet: if/elif/else, integer, string and file operators, case, boolean operators and using a function as a condition.
- Bash script to run an Oracle SQL query — Shell script that checks the Oracle environment and runs a typed query with sqlplus -s.
- Bash special parameters: $?, $0, $#, $$ — Quick reference to the Bash special parameters for the exit status, script name, argument count and shell process ID.
- Long shell commands with sudo sh -c: quoting — Two patterns to run a long shell command with pipes and quotes as root, and the escaping pitfalls to avoid.
- Run a Bash script on remote servers over SSH — Check memory, CPU, TCP connections and kernel on a list of Linux servers using ssh and bash -s.