SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 4 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 13 Dec 2017 My Price 10.00

Linux® Script Worksheet –Marks 10inux® Script 1 (2 Marks)

Need help with this assignment. Can you help? UNIX is so troublesome for me.

University of Phoenix Material

 

Linux® Script Worksheet –Marks 10

 

To: Facilitator’s name

From: Your name

Date: mm/dd/yyyy

 

Linux® Script 1 (2 Marks)

 

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 (2 Marks)

 

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 (3 Marks)

 

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 (3 Marks)

 

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

 

 

 

Attachments:

Answers

(5)
Status NEW Posted 13 Dec 2017 09:12 AM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)