gnu-linux-shell-scripting icon indicating copy to clipboard operation
gnu-linux-shell-scripting copied to clipboard

A foundation for GNU/Linux shell scripting


logo.png


Gnu-linux-shell-scripting is a foundation for shell scripting in the GNU/Linux environment.

It is made up of the following four types of solutions:

  1. Scripts
  2. Functions scripts
  3. One-liners
  4. Aliases

Paradigms

Here is a list of all the paradigms with a few examples in which all solutions exist:

Application management

  • Generic RDBMS utility functions for a MySQL database
  • Check if a PostgreSQL database exists.

File management

  • Rename all files matching a name recursively.
  • Get the size in megabytes of one or more files and/or directories.

System management

  • List all processes owned by the current user.
  • Print the target architecture of the current operating system.

Hardware management

  • Check if the primary wireless local area network device interface is soft blocked.
  • Get the vendor name of the CPU.

Shell management

  • Execute a command in the background.
  • Remove the last N entries from the bash history.

X11 management

  • Get the ID of the active window.
  • Get the class of a window by ID.

Mobile device management

  • Watch the X and Y screen tap positions of an Android device.
  • Mount and unmount an MTP device.

Scripting

  • Bash array utilities
  • Bash date and time utilities

Text manipulation

  • Replace all occurrences of a string recursively.

Text processing

  • Count the number of characters in a string.

Number processing

  • Convert a hexidecimal number to decimal.

Packaged solutions

Gnu-linux-shell-scripting has an extension repository for solutions consisting of more than one file.

Code style guidelines

All the solutions in this repository follow these standard guidelines.