How to automate command Line Task
In this weekend, I attended a workshop on shell scripting organised by Linuxworld under the Mentorship of Vimal Daga Sir.
The concepts that I learn from workshop are:
🔰 A shell script is a list of commands in a computer program that is run by the unix shell which is command line interpreter.
🔰Bash shell or command language interpreter, for the GNU operating system. Bash shell is Bourne Again Shell , a popular type of shell in UNIX.
🔰Exit code to check whether a command run successfully or not. We can check the return codes in the manual of cmd. It is normally 0 means successful and other is failure. The exit code can be found using: echo $?
🔰Script is a sequence or set of multiple commands. Command is a directive to a computer program to perform a specific task.
🔰awk is a linux shell command which is used for formatting and aggregation of files. It has various usecases and has its own scripting world.
🔰Watch command runs the same command at a certain time interval for monitoring, and we can set the interval as required.
🔰sed we use for searching data and replacing the data.
And as always this workshop was more focused on real industry use-cases.