Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

.plan Go to your home directory and create a text file with the name.plan. Put some information about yourself in this file. The text in

.plan
Go to your home directory and create a text file with the name.plan.
Put some information about yourself in this file.
The text in this file will be printed to the terminal when finger is run on your Unix ID or name.
Use nano or any other Unix text editor to create this file.
The shell script named hw3.sh
Create an hw3 directory in your hw directory inside your it244 directory.
Go to this hw3 directory.
Run Unix commands that will execute the steps below.
When you have a command line that does what the step asks you to do, copy it from the command line and paste it into hw3.sh using nano or any other text editor.
When you have completed all the steps, create an echo statement before the commands for each step, that will print the step number to the terminal.
Make sure that your script meets all of the requirements mentioned here.
Print to the terminal the contents of the file red_sox.txt in /home/ghoffman/course_files/it244_files
Using grep and pipes, | , select all the Red Sox away games where they won, except for the games they played against the Orioles
Away games are indicated by the @ symbol
Select all the Red Sox away games where they won, except for the games they played against the Orioles, sorted by date in reverse order
Print the contents of the file foo.txt in /home/ghoffman/course_files/it244_files to the terminal
Print to the terminal the contents of foo.txt, selecting only those lines with the word "foo" as a whole word
In other words, "foo" must NOT appear as part of another string, like "foobbbbbbbb".
There is an option for grep that tells it to only match the string when it appears as a word, not as part of a bigger string
Check the man page for grep to find this option
Don't call the man page from within your shell script.
Print to the terminal the lines in foo.txt that have the string ### in them
Print the contents of the file numbers1.txt in /home/ghoffman/course_files/it244_files to the terminal
Use head and tail to print to the terminal lines 6 through 13 in numbers1.txt
Use sort to print to the terminal the contents of numbers1.txt in reverse numerical order
Use diff to print to the terminal the differences between numbers1.txt and numbers2.txt in a human readable format
Print to the terminal the name of the host to which you are connected
Consult the man page for date, then use this command to print to the terminal the date in the format yyyy-mm-dd.
Don't call the man page from within your shell script.
Print to the terminal the location of the executable file for perl, a scripting language. The command you use should only work for executable files
Find all files that have the string "nano" in their filename
List all the users currently logged in to users3
Run finger on your Unix username to print to the terminal the information you entered in your .plan file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions