Display your system information using uname -a command

Assignment Help Operating System
Reference no: EM131340480

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

Reference no: EM131340480

Questions Cloud

International manager in eastern culture : What are 2 examples of global implications that status has for an international manager in Eastern culture?
What is the return on investment for 2004 : Which method would be most appropriate for calculating the division's return on investment? Why? Using this method, what is the return on investment for 2004?
What is the value of her contract if the interest rate : Sarah is paid $5 each year for the next 10 years with a Balloon Payment of $25 and a signing bonus of $50. What is the value of her contract if the interest rate is 6%?
Discuss all remedies that would be available : Advise as to whether there are any grounds for South Australian Trawler Co Ltd and / or ASIC to take legal action and, if so, discuss all remedies that would be available. Cite relevant statutory and case law authority in your answer
Display your system information using uname -a command : Create a new file called week5prog2.sh with vi or pico editor. Display your system information using "uname -a " command. Display your username and id using "id" command.
Oral treatment-cream or ointment : What did you use to treat it and did the treatment have any side effects? What would be the advantage of using an oral treatment vs. a cream or ointment?
Information to manage the cost of processing orders : El Dorado Company has two production plants. Recently, the company conducted an ABM study to determine the cost of activities involved in processing orders for parts at each of the plants. How might an operations manager use this information to manag..
Control the care and cost of health benefits : Consumer Driven Health Plans provide individuals with an incentive to control the care and cost of health benefits. Research a CDHP such as an HRA, HSA, or FSA and discuss ways that you might be able to control cost if you were enrolled in the pla..
Calculate the temperature of the winding : Calculate the temperature of the winding under the new conditions, assuming that the temperature coefficient of resistance of copper is 0.004 26/°C at 0°C.

Reviews

Write a Review

Operating System Questions & Answers

  What is data-processing cycle

What is data-processing cycle

  Identify the differences in the code samples

Coding style is a very important part for those entering the technology field. Here are two model Java programs that do exactly the same thing according to the user.

  When a process is multithreaded

Explain the differences, advantages, and disadvantages between user and kernel threads. What are the advantages and disadvantages of a lightweight process?

  Define the term context switch

Define the term context switch. Explain how context switching takes place. (use a diagram, with two processes)

  describe how you would do so with a positive feedback loop.

Describe how you would use a negative feedback loop to manage your bank balance.Describe how you would do so with a positive feedback loop. Explain which you would prefer and why?

  Why is tcp/ip such a complex protocol

Compare and contrast the advantages and disadvantages of two protocols that perform similar functions at any layer of the OSI model.

  Difference between an exclusive lock and a shared lock

Describe the difference between an exclusive lock and a shared lock. Define deadlock and how can it be avoided? How can it be resolved once it occurs?

  Management has asked you to create a report

Management has asked you to create a report that details how the windows 7 operating system works. describe the fundamental and generic components of the OS. discuss how the os would handel the following, process and threads, memory management, pr..

  Questiona process is a program under execution and as it

questiona process is a program under execution and as it executes it changes state. the state of a process is defined

  Identify one reason indexes are useful

Describe what you would have to do if indexes weren't available in order to get the reason you initially stated and how the query optimizer generates and selects a query plan.

  Automatic or traditional method to open a file

Some systems automatically open a document when it is referenced for the 1st time and close the file when the job terminates.

  Determine transmission line speed

Imagine you are creating an application at work that transmits data record to another building within the similar city. The data records are 500 bytes in length,

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd