At its core, Bash allows you to check for the existence of a directory using conditional statements and the -d operator.
-d
Bash has a built-in command called mktemp to make temporary files easily.
mktemp
Here’s the simplest way to read a file line-by-line.
Sample output assuming your script is named ’example.sh’ and you call ./example.sh arg1 arg2.
./example.sh arg1 arg2
Bash provides straightforward methods for writing to a file.
In Bash, you use >&2 to redirect output to stderr.
>&2