Bash Language
Some examples regarding the
bash
shell scripting language
Arguments
: Passage of arguments from the shell to a
bash
script
Example 1
: Extraction of some statistics regarding files (
for
and
if
statements)
Example 2
: Print the numbers between
1
and
20
, with the exception of the number
4
and
13
(
while
and
if
statements).
Example 3
: Sum of a set of numbers passed to the script as a command line argument.
Example 4
: Script to obtain some statistics about running processes (bash
if
and
shift
commands)
Example 5
: Found a file inside a list of directories
Read Files
: How to read a file word-by-word, line-by-line, character-by-character
Arrays
: Bash
arrays
and
associative arrays
Exam 20140908
: Solution of the 2014/09/08 exam