Could someone help me by midnight tonight!!!
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:
- Insert a reference to the Bourne shell as the command interpreter of this shell script called valid_name.
- Add the appropriate comments
- Test that exactly one command line argruments is enter from the command line. If not, display the usage message and stop the script and set the status to 1. If exactly one is entered, continue processing.
- The argument enter on the command line is a first and last name ( for example: "John Smith").
- If the argument is a validly formatted name, you display The "name enter" is valid to standard out.
- If the argument is not a validly formated name, you display The "name enter" is not valid to standard out
- Cut and Paste you program in the space below also with a session of you executing your program with the examples provided
For Example,
$ valid_name "John Smith"
John Smith is valid
=========
$ valid_name "John smith"
John smith is not valid
=========
$ valid_name "John"
John is not valid
==========
$ valid_name "jOhn Smith"
jOhn Smith is not valid
===========
$ valid_name "John sMith"
John sMith is not valid
2. Relevant commands, code, scripts, algorithms:
3. The attempts at a solution (include all code and scripts):
#!/bin/sh
if echo $var | grep '^[A-Za-z_][A-Za-_z]*$' > /dev/null
then
echo $var "is valid"
else
echo $var "is not valid"
fi
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
St Clair College - Windsor Ontario
Phil Aylesworth MIT 516 Linux II - St. Clair College - Canada's Southernmost and Hottest College
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).