Question
1. Copy the file ~smcgowan/Cyber/Unix/Data/cards and write a bourne shell (/bin/sh) script that will grep it for the name "Mantle" (case INsensitive). If the grep finds any matches, output them to standard output. If there are no matches use echo to write a message to standard output that states that. (NOTE: The bourne shell does not assign a special meaning to the ~ character)
2. Write a bourne shell (/bin/sh) program that will test for the existence of a regular file. If it exists, output a line that states that. If it does not exist, echo a line that states that and touch the filename to create it. The program should accept the filename being tested as a positional parameter.
3. Copy the file called list from ~smcgowan/Cyber/Unix/Data. Write a bourne shell (/bin/sh) program that will accept a file name as a positional parameter and simply echo the values contained within that file to standard output in a single column.
Solution Preview
These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.
#!/bin/shif grep -i "Mantle" /users/students/dhenr170/cards; then
echo...
By purchasing this solution you'll be able to access the following files:
Solution.docx.