Question: Need help to get an answer to these three question, please. I know i do not have attached original file for questions 39 and 40

Need help to get an answer to these three question, please. I know i do not have attached original file for questions 39 and 40 but i need a pattern of syntax. You can use your file in place of mine. I need step by step solutions with output please(UNIX)

Need help to get an answer to these three question, please. I

3 Write and run a simple shell script named echomyvar.sh that displays the PID of the process running the script and value of the variable named mvar but do not set the variable value within the script. Set the value of the variable myvar to "zach" from the command line (not in the script) using "declare". Run the script, does it show both the pid and the proper value of myvar? 39. Write a regular expression to grep the file messages.out Match all lines that have the word "Connect" in it but not any other series of letters that include Connect. For instance, do not match "Connects". Also, do not match any of these lines that "end" with the word try". Pipe this to a command to count the amount of matched lines. The result should be "2". 40. Write a script named pinger.sh that reads /etc/hosts and matches all lines that have the pattern ember" and also only return the first column which would be an ip address. The script will need to ping for a count of 1 to each ip address. Then it should output the ip address being pinged as well as the line from the output that matches "packet loss

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!