Question

linux help

1.- Create a file called trees, containing the following individual lines: Oak tree Pine tree Spruce tree Cottonwood Maple tree Pine tree Copy in the contents of the trees to more trees file. Next, add the following trees at the end of the list. Redwood Willow tree a. Use a command to compare the trees and more trees files and show the differences in terms of individual lines that differ b Determine the number of bytes in both the trees and more trees file c. Use a command to replace the word tree with plant in the more tre file d. Use a command to make all letters uppercase in trees file e. Use the uniq command to remove the duplicate lines in trees file f Use the grep command to find all the lines that contain the word Pine in the trees After you run the commands on the command line, write a script with your answers. Upload your script and the screen shot of your output.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a. diff trees more_trees

diff trees more_trees
6a7,8
> Redwood
> Willow tree

b. wc -c trees; wc -c more_trees

wc -c trees; wc -c more_trees
68 trees
88 more_trees

c. sed -i 's/tree/plant/g' more_trees

d. sed -i 's/.*/\U&/g' trees

e. sort gtrees| uniq

f. grep 'Pine' trees

Add a comment
Know the answer?
Add Answer to:
linux help Create a file called trees, containing the following individual lines: Oak tree Pine Tree...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • LINUX QUESTIONS (dont have to display output, I will be running these commands myself to check...

    LINUX QUESTIONS (dont have to display output, I will be running these commands myself to check the output) Display the command(s) used to do the following: create an empty file called history by using just a redirection operator. Verify and show. Show/verify all results (i.e., all commands and their corresponding outputs). Wait 1 minute or more and then display the command(s) used to do the following: change the timestamp on the history file you just created. Verify/display the change. Show/verify...

  • LINUX 140U Create a file named script1.sh that contains a bash script that: Accepts NO command...

    LINUX 140U Create a file named script1.sh that contains a bash script that: Accepts NO command line arguments and does NOT use the read command. I will give you no credit if your bash script includes a read command. Also, you need to have at least one for..in loop in your code even if there may be other ways to do this problem. The script will go through a list of entries in the current directory (do not process subdirectories):...

  • Completion is a screenshot of the batch file showing all of the steps to create the file system s...

    Completion is a screenshot of the batch file showing all of the steps to create the file system shown below. Instructions Create a batch file clifilesystem.cmd using Notepad which performs the following steps to create the file system shown below. Also use a proper comment for each step before the command. Proof your work. Finally submit the clifilesystem.cmd file in Blackboard Figure 1. The clijfilesystem.cmd file system Work from Desktop unless using an absolute path Desktop NOS110 OS Labs Homework...

  • 3 Programming Question (45 points) 3.1 Instructions You need to write the code by yourself. Your...

    3 Programming Question (45 points) 3.1 Instructions You need to write the code by yourself. Your implementation must use C/C++ and your code must run on the Linux machine general.asu.edu. Please refer to the programming guide (available under the Assignments folder on Blackboard) for using the general.asu.edu server, as well as compiling and running C/C++ code under Linux For this question, you need to provide a Makefile that compiles your program to an executable named a3 that runs on the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT