Write the following bourne shell scripts which perform the followin...

  1. Home
  2. Homework Library
  3. Computer Science
  4. Linux
  5. Write the following bourne shell scripts which perform the followin...

QuestionQuestion

Write the following bourne shell scripts which perform the following actions.

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 PreviewSolution 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/sh
if grep -i "Mantle" /users/students/dhenr170/cards; then
echo...

By purchasing this solution you'll be able to access the following files:
Solution.docx.

$30.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Linux Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats