Skip to content

Latest commit

 

History

History

Bash

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Welcome to our comprehensive collection of learning resources for Bash! Here, you'll discover a curated list of the best learning materials we've assembled just for you.

Take a moment to explore these valuable resources, handpicked to enhance your understanding of Bash. We strive to provide the most up-to-date and informative content available.

What is Shell?

Quoting from wikipedia

A Unix shell is a command-line interpreter or shell that provides a traditional Unix-like command line user interface. Users direct the operation of the computer by entering commands as text for a command line interpreter to execute, or by creating text scripts of one or more such commands. Users typically interact with a Unix shell using a terminal emulator, however, direct operation via serial hardware connections, or networking session, are common for server systems. All Unix shells provide filename wildcarding, piping, here documents, command substitution, variables and control structures for condition-testing and iteration
  • Interprets user commands
    • from terminal, from a file or as a shell script
    • expand wildcards, command/variable substitution
  • Command history, command completion and command editing
  • Managing processes
  • Shell variables to customize the environment
  • Difference between shell, tty and console

Popular Shells

Like any indispensible software, Shell has undergone transformation from the days of basic sh shell that was used in 1970s Unix. While bash is default shell in most distros and most commonly used, powerful and feature rich shells are still being developed and released

  • sh bourne shell (light weight Linux distros might come with sh shell only)
  • bash bourne again shell
  • csh C shell
  • tcsh tenex C shell
  • ksh Korn shell
  • zsh Z shell (bourne shell with improvements, including features from bash, tcsh, ksh)
  • cat /etc/shells displays list of login shells available in the current Linux distro
  • echo $SHELL path of current user's login shell

Bash scripts - Examples

  1. Hello.sh: get a simple output
  2. Process.sh: execute more than one command in a script
  3. Interactive.sh: a simple but very much interactive script
  4. Special-Pattern.sh: draw a diamond pattern with dots(.)
  5. While-Read.sh: read lines from a file using while loop
  6. Read-Menu.sh: display a menu for system information
  7. While-Menu.sh: a repeated menu for system information
  8. Affect.sh: print a spinner loader
  9. Colorful.sh: provide you with the output of several colours
  10. Convertlowercase.sh: convert data either from the file or standard input to lowercase
  11. up.sh: move up a directory in shell script
  12. List-dir.sh: list files in a directory
  13. Count-lines.sh: print out the line number of each file in current directory
  14. Randomfile.sh: create unique file/folder automatically with date and time stamp
  15. Random-emoji.sh: print ramdom emojis
  16. pomodoro.sh: a simple pomodoro app written in bash

Programming

  1. VersionCompare.sh: compare two version number

Utility

  1. Encrypt.sh: encrypt a file/folder with password
  2. Archive-and-encrypt.sh: archive a path into a file and encrypt the file
  3. weather.sh: check the weather in a specified location or using the geolocation of the ip address by default.
  4. WhereIP.sh: Get location of an IP address.

System Administration

  1. DirectorySize.sh: output a specified directory's size
  2. Test-File.sh: evaluate the status of a file/directory
  3. Server-Health.sh: report server related information
  4. CPU.sh: report if CPU usage exceeds the threshold
  5. Disk-Space.sh: check if the disk space crosses the limit
  6. CollectNetworkInfo.sh: gather information related to server
  7. RemoteBackup.sh: backup a local file into a remote server
  8. HardwareInfo.sh: show hardware information for systems Linux
  9. Get-Temperature.sh: show CPU temperature

Math

  1. Addition.sh: perform addition of two numbers
  2. Subtraction.sh: perform subtraction of two numbers
  3. Multiplication.sh: perform multiplication of two numbers
  4. Division.sh: perform division of two numbers
  5. Simplecacl.sh: a simple calculator
  6. Table.sh: print table of any number
  7. EvenOdd.sh: check if a number input from standard input is odd or even
  8. Factorial.sh: generate the factorial of a number
  9. Armstrong.sh: check if a provided number is Armstrong or not
  10. Prime.sh: check if a number is prime or not
  11. Fibonacci.sh: test if a number being entered is a Fibonacci or not
  12. Decimal2Binary.sh: convert Decimal Number to Binary
  13. Binary2Decimal.sh: convert Binary Number back to decimal
  14. Decimal2Hex.sh: convert Decimal Number to Hex
  15. Hex2Decimal: convert Hex number back to Decimal

Further Reading

Original Content and Authors

If you have any additional resources or links that you believe would benefit others, please feel free to contribute. Our goal is to create a repository of the best learning materials, ensuring everyone has access to top-notch content.

We appreciate your visit to this repository. If you find our initiatives valuable, kindly star this repository to show your support.

Thank you once again, and happy learning!