Using "if" statement checks for a file called "Name.txt" in the current directory. Removes (deletes) the file if it exist. This file will collect last name, first name, and age for 5 people.
Use a while loop to get the information (last name, first name, and age) for 5 people. age should be 0-100. Use three different variable names (fname, lname, and age) to read the data from the keyboard.
Store the data read from the keyboard in a file called "name.txt". After reading all the data for 5 people, display contents of name.txt file on the monitor.
Here is what I have so far.
if [ -f name.txt ]; then
# put something in here and it'll be done if the file exists
fi
person_num=1
while [ $person_num -lt 6 ]; do
# put stuff here to repeat for each person
person_num = $(eval $person_num + 1)
done
# use read -p prompt variable_name to ask for details.