If and Loops

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

  1. The problem statement, all variables and given/known data:
    In this script you will take a directory as input from the user and change the end of line sequence from a Unix EOL sequence to a DOS style EOL sequence for each file with a ".txt" file extension in the given directory.
    Create a script that will take input from the user to get a valid directory. Validations must be performed on the input and must be loop driven and only allow exit on a valid response.
    Make the script loop over the directory and on all files ending in ".txt" change the end of line sequence to a DOS style end of line sequence.
    This script must use, at a minimum, one if statement and one loop.

  2. Relevant commands, code, scripts, algorithms:

  3. The attempts at a solution (include all code and scripts):

  4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):Victor Valley College, Victorville, Ca, USA CIS90 Professor Thomas

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).

Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so, specifically complete the entire template.

Thank You.

The UNIX and Linux Forums.