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

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

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