It is important to study the programs in this chapter carefully and have a complete understanding of the way they are logically structured, as the programs to come will be increasingly complex. As an exercise, rewrite the programs in this chapter using the
test command rather than the
[[ ]] compound command. Hint: Use
grep to evaluate the regular expressions, and then evaluate its exit status. This will be good practice.