Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Operating System Expert

Linux Script 1

Requirements

Create a new file called week5prog1.sh with vi or pico editor.

Edit your new file using VI and change it so it performs the following actions:

• Display the date

• Display your system information using "uname -a " command

• Display your username and id using "id" command

• Display your current directory

Save the file and type your file name to execute.

Source Programs:

Insert your source code here.

$ cat week5prog1.sh

Output Results:

Insert the output here. Use a screen shot of the output with input requirements specified in the assignment.

1. Give execute permission to the user, group only

2. Run the script and show the output here

Linux Script 2

Requirements

Create a new file called week5prog2.sh with vi or pico editor.

Edit your new file using VI and change it so it performs the following actions:

• Display the date

• Display your system information using "uname -a " command

• Display your username and id using "id" command

• Change your directory /tmp

• Display your current directory

• Search Mary in the passwd file in /etc directory

• If the search is success, display that Mary is an user in this system

• Otherwise display that Mary is not in the system

You need to use "grep", "if" , "else" "$?"

Source Programs:

Insert your source code here.

$ cat week5prog2.sh

Output Results:

Insert the output here. Use a screen shot of the output with input requirements specified in the assignment.

1. Give execute permission to the user, group only

2. Run the script and show the output here

Linux Script 3

Requirements

Here is the question:

Some commands like cp, mv, mkdir need arguments. Similarly this script needs only two arguments. If user enters no arguments or one argument or three or more than 3 arguments, it displays error message like "You need to enter two arguments " If user enters two arguments, it displays the arguments in reverse order .

Create a new file called week5prog3.sh with vi or pico command

Edit your new file using vi and write the script: Create a new file called week5prog3.sh with vi or pico command.

• Display the date

• Display your system's host name "hostname " command

• Display your username using system variable "USER"

• If user enters no arguments or one argument or three or more than 3 arguments, it displays error message like "You need to enter two arguments "

• If user enters two arguments, it displays the arguments in reverse order .

Source Programs:

Insert your source code here.

$ cat week5prog3.sh

Output Results:

Insert the output here. Use a screen shot of the output with input requirements specified in the assignment.

1. Give execute permission to the user, group only

2. Run the script and show the output here with the following input

A. $ week5prog3.sh

B. $ week5prog3.sh Tom

C. $ week5prog3.sh Tom David Smith

D. $ week5prog3.sh Tom David

Linux Script 4

Requirements

Create a new file called week5prog4.sh with vi or pico editor

Here is the question:

Write a program which displays 4 options to the user and asks the user to enter one option and displays the output depending on the choice. If the user enters any other character, display error message that he has to enter only a, b, c or d

a. Current date and time

b. No of users currently logged in

c. List of directories in PATH variable

d. Your login name using "LOGNAME" variable

(hint : Use the case statement and read the option with read command)

Source Programs:

Insert your source code here.

$ cat week5prog4.sh

Output Results:

Insert the output here. Use a screen shot of the output with input requirements specified in the assignment.

1. Give execute permission to the user, group only

2. Run the script and show the output here with the following inputs each time when the scripts prompts like

1st Run : Enter an option : a

2nd Run : Enter an option : b

3rd Run : Enter an option : c

4th Run : Enter an option : d

5th Run : Enter an option : x

Operating System, Computer Science

  • Category:- Operating System
  • Reference No.:- M92094061
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Operating System

Taskyour job in this assignment is to create two virtual

Task Your job in this assignment is to create two Virtual machines each running a different but the latest distribution of Linux e.g. Ubuntu Server and CentOS. Each of these VM's is to offer services to a user base. The ...

Show all stepssuppose that the following processes arrive

Show all steps Suppose that the following processes arrive for execution at the times indicated. Each process will run the listed amount of time. in answering the questions, use non-preemptive scheduling and base all dec ...

Foundation of information technologyresearch types of

Foundation of Information Technology Research types of operating systems that are currently available and provide a scenario in which the operating system you chose would be appropriate to be used in this situation. Expl ...

Question 1answer the following questions 10 marks a

Question 1 Answer the following questions: 10 marks a. Consider the following page reference string: 3, 1, 4, 1, 2, 3, 5, 3, 2, 1, 2,5, 4, 3, 5, 2, 4,2, 5,3 Using the above page reference string display the contents of t ...

State the required answer precisely and then provide proper

State the required answer precisely and then provide proper explanation. It is not enough to provide one- word or one-line answers. Briefly describe the following concepts and indicate how they are related in the context ...

Question you are a security administrator responsible for

Question: You are a security administrator responsible for providing secure configuration requirements for new laptop deployments. After reading Module 2 of Certified Secure Computer User v2exercises, apply the configura ...

Research types of operating systems that are currently

Research types of operating systems that are currently available and provide a scenario in which the operating system you chose would be appropriate to be used in this situation. Explain why you think the choice you made ...

Catalog course descriptionin this course students carry out

Catalog Course Description In this course students carry out independent research in a significant technical area of information, network, and computer security. The student is to investigate a technical area, research i ...

Question topic computerized operating systems os are almost

Question: Topic: Computerized Operating Systems (OS) are almost everywhere. We encounter them when we use out laptop or desktop computer. We use them when we use our phone or tablet. Find articles that describes the diff ...

Question research hex editors available for mac os and

Question : Research hex editors available for Mac OS and Linux. Based on the documentation, how easy would validating these tools be? Select at least two hex editors for each OS, and discuss what you would do to validate ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As