February 2019
Beginner
504 pages
10h 47m
English

The scripts we have written so far lack a feature common in most computer programs : interactivity, or the capability of the program to interact with the user. While many programs don’t need to be interactive, some programs benefit from being able to accept input directly from the user. Take, for example, this script from the previous chapter:
#!/bin/bash# test-integer2: evaluate the value of an integer.INT=-5if [[ "$INT" =~ ^-?[0-9]+$ ]]; then if [ "$INT" -eq 0 ]; then echo "INT is zero." else if [ "$INT" -lt 0 ]; then echo "INT is negative." else echo ...
Read now
Unlock full access