Day 4 task: Shell scripting

Day 4 task: Shell scripting

"Unlocking the Power of Automation: A Practical Guide to Shell Scripting"

·

2 min read

What is a shell?

In Linux, the "shell" is a command-line interface that lets users interact with the operating system by typing commands. It acts as a bridge between the user and the system, interpreting commands and executing them. Popular shells include Bash, sh, and ksh.

What is Linux shell scripting?

Linux shell scripting refers to the creation and execution of scripts written in a shell language within a Linux environment. The shell is a command-line interpreter that allows users to interact with the operating system by typing commands. A shell script is a series of commands written in a scripting language that the shell can execute.

Why should we learn shell scripting?

Learning shell scripting is essential for automating tasks, customizing environments, troubleshooting, and boosting efficiency in managing Linux systems, making it a valuable skill for IT professionals, system administrators, and those involved in DevOps.

What is #!/bin/bash? can we write #!/bin/sh as well?

#!/bin/bash is called a shebang or hashbang. It indicates the path to the interpreter that should be used to execute the script.

Yes, you can use #!/bin/sh as well, and it would specify the Bourne Shell as the interpreter. The shebang is placed at the beginning of a script and helps the system locate and use the correct shell for interpreting the script.

  • Write a Shell Script which prints I will complete the #90DaysOofDevOps challenge

  • Write a Shell Script to take user input, input from arguments and print the variables.

  • Write an Example of If else in Shell Scripting

else

THANK YOU FOR READING!

Do follow me on LinkedIn for further blogs.

linkedin.com/in/manasa-j-03b633238