Dealing with user input
So far, we've been dealing with really static scripts. While it's fun to have a story available for everyone to print out, it hardly qualifies as a functional shell script. At the very least, it's not something you are going to use often! So, we'd like to introduce a very important concept in shell scripting: user input.
Basic input
At a very basic level, everything that you put on the command line right after calling the script can be used as input. However, it is up to the script to use it! For example, consider the following situation:
reader@ubuntu:~/scripts/chapter_08$ ls hello-int.sh hello-world-variable.sh name.sh variable-naming-proper.sh variable-naming.sh reader@ubuntu:~/scripts/chapter_08$ bash name.sh There once was a guy named Sebastiaan. Sebastiaan enjoyed Linux and Bash so much that he wrote a book about it! Sebastiaan really hopes everyone enjoys his book. reader@ubuntu:~/scripts/chapter_08$ bash name.sh Sanne There once was a guy named Sebastiaan. Sebastiaan...