Bash

Bash Reference Manual

Illustrated Redirection Tutorial

Invoking a bash script

./test.sh
. ./test.sh
source ./test.sh
sh ./test.sh

https://www.gnu.org/software/bash/manual/bashref.html#Bourne-Shell-Builtins
. filename [arguments]
Read and execute commands from the filename argument in the current shell context.
This builtin is equivalent to source.

https://unix.stackexchange.com/questions/43882/what-is-the-difference-between-sourcing-or-source-and-executing-a-file-i
./test.sh runs test.sh as a separate program. It may happen to be a bash script, if the file test.sh starts with #!/bin/bash. But it could be something else altogether.

. ./test.sh executes the code of the file test.sh inside the running instance of bash. It works as if the content file test.sh had been included textually instead of the . ./test.sh line.

https://stackoverflow.com/questions/13786499/what-is-the-difference-between-using-sh-and-source
When you call source (or its alias .), you insert the script in the current bash process. So you could read variables set by the script.

When you call sh, you initiate a fork (sub-process) that runs a new session of /bin/sh, which is usually a symbolic link to bash. In this case, environment variables set by the sub-script would be dropped when the sub-script finishes.

Add a GUI to Linux Shell Scripts

Add a GUI to Linux Shell Scripts using the zenity toolkit
Uses GTK. GTK stands for GIMP Tool Kit, which is the toolkit used to develop the GNOME interface.

Versions

The version 2 update of the classic Bash scripting language added array variables, string and parameter expansion, and a better method of indirect variable references, among other features.

On July 27, 2004, Chet Ramey released version 3 of Bash. This update fixed quite a number of bugs and added new features:

  • A new, more generalized {a..z} brace expansion operator.
  • The ${!array[@]} operator, which expands to all the indices of a given array.
  • The =~ Regular Expression matching operator within a double brackets test expression. (Perl has a similar operator.)

Chet Ramey announced Version 4 of Bash on the 20th of February, 2009. This release has a number of significant new features, as well as some important bugfixes:

  • Associative arrays.
  • Enhancements to the case construct: the ;;& and ;& terminators.
  • The new coproc builtin enables two parallel processes to communicate and interact.
  • The new mapfile builtin makes it possible to load an array with the contents of a text file without using a loop or command substitution.
  • The read builtin got a minor facelift.
  • Parameter substitution gets case-modification operators.
  • Substring extraction on positional parameters now starts with $0 as the zero-index. (This corrects an inconsistency in the treatment of positional parameters.)
  • The new ** globbing operator matches filenames and directories recursively.

References:

What is the difference between test, [ and [[ ?

http://mywiki.wooledge.org/BashFAQ/031

Special Parameters

$*, $@, $#, $?, $-, $$, $!, $0, $_
https://www.gnu.org/software/bash/manual/bashref.html#Special-Parameters