30 Bash Script Examples
Bash Script Bash scripts can be used for various purposes, such as executing a shell command, running multiple commands together, customizing administrative tasks, performing task automation etc. So knowledge of bash programming basics is important for every Linux user. This article will help you to get the basic idea on bash programming. Most of the common operations of bash scripting are explained with very simple examples here. The following topics of bash programming are covered in this article. Hello World Echo Command Comments Multi-line comment While Loop For Loop Get User Input If statement And Condition if statement Or Condition if statement Else if and else condition Case Condition Get Arguments from Command Line Get arguments from command line with names Combine two strings in a variable Get Substring of Strings Add 2 numbers into a variable Create a Function Use Function Parameters Pass Return Value from Script Make directory Make dire...