Trying to do a simple script that outputs to a file then ends if the inputed info is correct. But if the info is incorrect they have to go back to the start of the script and remove the file and create a new blank one. This is the part i'm having a bit of trouble
echo "Please enter you full name =>"
read full_name > user_profiles.txt
echo "Please enter you street address =>"
read number street street_name >> user_profiles.txt
echo "Please enter your City =>"
read city >> user_profiles.txt
echo "Please enter your State (enter entire name no abbreviations) =>"
read state >> user_profiles.txt
echo "Please enter your zip code =>"
read zip >> user_profiles.txt
echo $number $street $streetname
echo $city, $state $zip
echo "Is this correct? (please enter 1 for yes and 0 for no =>"
if [ $correct -eq 0 ]; then
echo "Thank you for your time, Have a nice day."
echo "`rm user_profile` ; `bash info`"
This is what i got so far....please be gentle =)