Welcome to the Bash Scripting Repository! This repository contains various Bash scripts and examples to automate tasks, manage systems, and improve productivity.
Please note that the information contained in this repository is provided for informational purposes only. We make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability, or availability with respect to the information contained in this repository for any purpose. Any reliance on such information is therefore strictly at your own risk.
Bash scripting is a powerful way to automate tasks in Unix/Linux environments. Whether you're a beginner or an advanced user, this repository has something for you. Explore a collection of scripts categorized by functionality.
Before using the scripts, ensure the following:
- A Unix/Linux-based operating system (e.g., Ubuntu, Fedora, macOS).
- Bash shell (version 4.0 or later is recommended).
- Basic knowledge of shell commands.
-
Clone the repository:
git clone https://github.com/your-username/bash-scripting.git cd bash-scripting
-
Make scripts executable:
chmod +x script_name.sh
-
Run the script:
./script_name.sh
- Hello World
- Variable
- Normal variable
- Constant (Readonly) variable
- Comments
- Single line comment
- Multi-line comment
- Array
- Array creation
- Array Declaration
- Accessing elements
- Accessing From particular indexing
- Accessing from particular indexing with several elements count
- Associate Array
- Declaration of associate array
- Entering the single key-value pair at a time
- Entering the multiple key-value pair at a time
- String
- String Declaration
- String Accessing
- Length of the string
- Replace the Full OR Substring
- Extract OR slice the sub-string
- Convert into Upper case
- Convert into Lower case
- User Input
- without prompt
- with prompt
- Operator
- Arithmetic Operator
- Using let keyword
- Using the (( )) symbol with arithmetic and expression operations
- Comparison Operator
- Equal to
- Greater than
- Greater than equal to
- Less than
- Less than equal to
- Not equal to
- Logical Operator
- AND Operator
- OR Operator
- Ternary Operator
- Arithmetic Operator
- Conditional Statement
- If statement
- If-Else statement
- Elif (else-if) statement
- Case statement (choice-based)
- Looping Statement
- for loop
- for loop with array and range
- while loop
- until loop
- Infinite loop
- for infinite loop
- while infinite loop
- until infinite loop
- select loop
- for loop
- Function
- Function decleration
- Function calling
- Basic function
- parameter / agrument function
- default parameter / argumnet function
- recursion function
Contributions are welcome! Follow these steps:
- Fork the repository.
- Create a new branch for your feature:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature description"
- Push to your branch:
git push origin feature-name
- Open a pull request.
This repository is licensed under the MIT License. See the LICENSE file for details.
https://www.linkedin.com/in/nkrgupta999
Happy scripting! 🎉