Problem
Write a script that accepts a 10-digit number as argument and writes it to the standard output in the form nnn-nnn-nnnn. Perform validation checks to ensure that
(i) a single argument is entered.
(ii) the number can't begin with 0.
(iii) the number comprises 10 digits.
Ensure that all other messages are written to the standard error. You'll need to use this script in Exercise 13.24.
Exercise 24
24 Devise a script that looks at every component of PATH and checks whether the directory exists and is also accessible.