Skip to content

Repository files navigation

Shell Programmings

Overview

This repository contains a collection of shell scripts demonstrating various shell programming techniques

Prerequisites

  • Unix-like operating system (Linux, macOS)
  • Bash shell (version 4.0 or higher recommended)
  • Basic understanding of shell scripting

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/shell-programming.git
cd shell-programming

Script Permissions

To ensure all scripts are executable, run the following command:

chmod +x file_name/*.sh

Permission Breakdown

  • chmod +x: Adds execute permission
  • scripts/*.sh: Applies to all .sh files

Running Scripts

Basic Execution

To run a script, use:

./scripts/script_name.sh

Example

# Run Node Health script
./scripts/node_health.sh

# Run name script
./scripts/name.sh

Script Descriptions

  1. name.sh: hello world
  2. ifelse.sh: syntax for if else in bash
  3. for_loop.sh: synatx for implementing for loop in bash
  4. node_health.sh: Display node health

Security Notes

  • Always review scripts before executing
  • Use sudo cautiously with shell scripts
  • Implement proper error handling in production environments

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new Pull Request

Contact

[Mohammad Asad Rahmani] [email : asadrahmani3101@gmail.com ]

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages