Basic Knowledge for Bash script


In this article, I would like to show some basic knowledge for Bash script.

🎳 Stop when occuring error

If error was happened in your Bash script, you should stop the process.
So, you should set set -e -u in top of your Bash script.

#!/bin/sh
set -e -u # Stop when occuring error
cd "${0%/*}/../"

🐝 Special Thanks

🖥 Recommended VPS Service

VULTR provides high performance cloud compute environment for you. Vultr has 15 data-centers strategically placed around the globe, you can use a VPS with 512 MB memory for just $ 2.5 / month ($ 0.004 / hour). In addition, Vultr is up to 4 times faster than the competition, so please check it => Check Benchmark Results!!