Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Need help to get the step by step output of these questions. I need step by step

ID: 3587598 • Letter: N

Question

Need help to get the step by step output of these questions. I need step by step solution with output please.

6. Redirect standard output of cat to create a file named days that holds the names of the days of the week in chronological order, one per line. Do not redirect standard input to cat; it will come from the keyboard. Remember to press CONTROL-D on a line by itself to exit from cat. tip The cat utility belongs to a class of utilities that can accept input from a file given as an argument or, if you do not specify an argument, from standard input Use cat to read the days file and send it to standard output, through a pipeline, to standard input of another utility to arrange the lines by alphabetical order.. 7. Produce a long listing of the /etc, /us/bin, and /sbin directories, sending the output to a file and running the command in the background. Do this with a single command line. 8. Run a single command line to cat /var/log/messages, send the output to a file called log.log with a tee command send the other tee output to grep to search for root pipe a final 'uniq' command to prevent repeated lines. Which utility and option can you add to count each line?

Explanation / Answer

//solution

6)

at command prompt type

$ cat >days                                                                                                                                            

Monday                                                                                                                                                       

Tuesday                                                                                                                                                       

Wednesday                                                                                                                                                    

Thursday                                                                                                                                                      

Friday                                                                                                                                                        

Saturday                                                                                                                                                     

Sunday

CTRLD

it saves the above input to file called days

Now sort days using sort utility as below

cat days | sort                                                                                                                                      

Friday                                                                                                                                                        

Monday                                                                                                                                                       

Saturday                                                                                                                                                      

Sunday                                                                                                                                                        

Thursday                                                                                                                                                     

Tuesday                                                                                                                                                       

Wednesday

7) ls /etc /usr/bin /sbin >output &  

command is run in background.. Out of the listing of 3 directories goes into file called output

U can check output file using

cat output

8) cat /car/log/messages | tee log.log | grep "root" | uniq

we can add wc -l command to count line