This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # [ ] 1. the name or number. If it exists in the directory, then the line should be displayed. | |
| # [ ] 2. both. The entry is displayed if it exists and is added if it doesn’t exist in the file. | |
| # [x] 1. Assign the pathname to the file teledir.txt to a variable, say, TELEDIR. | |
| # [x] For example, if it is in your home directory, you’ll need to assign $HOME/teledir.txt to the variable TELEDIR | |
| # [x] 2. Check that one or two arguments are supplied using $# and the case…esac construct. | |
| # [x] 1. If one or two arguments are supplied, do nothing | |
| # [x] 2. otherwise, Indicate that the usage must be in the form scriptname [name number], then exit | |
| # [x] 3. Using the $# and the case…esac construct, |