How it works...

Now, we have written a script cal_runtime.sh and four commands in that script: clear, ls, date, and a python3 installation command. Run your script as follows:

$ time bash cal_runtime.sh

After the execution, you will get the runtime of the script at the bottom of your output.

Get Bash Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.