Skip to content

DiegoPaniagua23/bash-scripting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

Bash Scripting Examples

This repository contains a collection of simple Bash scripts, each demonstrating a fundamental concept of shell scripting.

How to Use

  1. Clone the repository:

    git clone <repository-url>
  2. Navigate to the script's directory:

    cd bash-scripting/scripts
  3. Make any script executable:

    chmod u+x script_name.sh
  4. Run the script:

    ./script_name.sh

Scripts

Script Name Description
shelltest.sh Prints a simple "Hello World!" message to the console.
variables.sh Shows how to declare and use variables.
positionalarguments.sh Demonstrates how to use positional arguments passed to the script.
interactiveshell.sh Illustrates how to create an interactive script that reads user input.
ifelifelse.sh Provides an example of the if-elif-else conditional structure.
case.sh Shows how to use the case statement to handle multiple conditions.
arrays.sh Explains how to define and access elements in an array.
forloop.sh Demonstrates a for loop that iterates over the items in an array.
firstfunction.sh Teaches how to define and call a simple function.
functionposargu.sh Combines functions with positional arguments and return codes.

About

Some simple bash scripts for self-learning

Topics

Resources

License

Stars

Watchers

Forks

Languages