POS/420 Week 3 Individual: Linux ® Script Worksheet

profileRSaleem
 (Not rated)
 (Not rated)
Chat

University of Phoenix Material

 

Linux® Script Worksheet

 

To: <Insert your facilitator's name>

From: <Insert your name>

Date: <Insert the date (XX/XX/XXXX)>

 

Before beginning the Linux® Script Worksheet, update the PATH variable to add your folder from last week. You will find how to do this on p. 134 of Linux® Command Line and Shell Scripting Bible.

 

 

Linux® Script 1

 

Requirements

 

In the same folder as last week, create a new file titled week3prog1[name].scr.

 

Change the permissions on this new file to add the execute bit for user, group, and owner.

 

Edit your new file using Gedit or VIand change it so it performs the following actions:

 

·         Display the date.

·         Display the words Hello World.

·         Display information about users that are currently logged in.

 

Note. Remember to include #!/bin/bash as the first line of your script.

 

Save the file and type your file name to execute.

 

Source Programs

 

<Insert your source code here.>

 

Output Results

 

<Insert the output here. Use a screenshot of the output with the input requirements specified in the assignment.>

 

 

 

Linux® Script 2

 

Requirements

 

In the same folder as last week, create a new file called week3prog2[name].scr.

 

Change the permissions on this new file to add the execute bit for user, group, and owner.

 

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

 

·         Using a line after #!/bin/bash, take the output of the ps –e command and pipe it to the sort command.

·         After it has been piped to the sort command, redirect that output to a file called psfile.

 

Note. Remember to include #!/bin/bash as the first line of your script.

 

Source Programs

 

<Insert your source code here.>

 

Output Results

 

<Insert the output here. Use a screenshot of the output with the input requirements specified in the assignment.>

 

 

 

Linux® Script 3

 

Requirements

 

In the same folder as last week, create a new file called week3prog3[name].scr.

 

Change the permissions on this new file to add the execute bit for user, group, and owner.

 

Create two files.

 

·         File1 has one line with the value of 5.

·         File2 has one line with the value of 100.

 

Edit your new file using Gedit or VIand change it so it performs the following actions:

 

·         Read the values from the two files above (file1 and file2).

·         Divide the value from file2 by the value in file1.

·         Output the result of this calculation to a new file called file3.

 

Note. Remember to include #!/bin/bash as the first line of your script.

 

Source Programs

 

<Insert your source code here.>

 

Output Results

 

<Insert the output here. Use a screenshot of the output with the input requirements specified in the assignment.>

 

 

 FOLLOWING IS THE LIST OF COMPLETE WEEKLY ASSIGNMENTS. PLEASE FOLLOW/CLICK THE DESIRED LINK



POS/420 Week 1 Individual: UNIX ® and Linux ® Comparison Matrix

https://www.homeworkmarket.com/content/pos420-week-1-individual-unix-%25C2%25AE-and-linux-%25C2%25AE-comparison-matrix

 

POS/420 Week 2 Learning Team: UNIX ® , Linux ® , and Windows Server ® Critique and Presentation Preparation Part I

https://www.homeworkmarket.com/content/pos420-week-2-learning-team-unix-%25C2%25AE-linux-%25C2%25AE-and-windows-server-%25C2%25AE-critique-and-presentation-pr

 

POS/420 Week 2 Individual: File Processing Commands Worksheet

https://www.homeworkmarket.com/content/pos420-week-2-individual-file-processing-commands-worksheet-0

 

POS/420 Week 2 Individual: Linux ® Directory Log

https://www.homeworkmarket.com/content/pos420-week-2-individual-linux-%25C2%25AE-directory-log

 

POS/420 Week 3 Learning Team: UNIX ® , Linux ® , and Windows Server ® Critique and Presentation Preparation Part II

https://www.homeworkmarket.com/content/pos420-week-3-learning-team-unix-%25C2%25AE-linux-%25C2%25AE-and-windows-server-%25C2%25AE-critique-and-presentation-pr

 

POS/420 Week 3 Individual: Linux ® Script Worksheet

https://www.homeworkmarket.com/content/pos420-week-3-individual-linux-%25C2%25AE-script-worksheet

 

POS/420 Week 4 Learning Team: UNIX ® , Linux ® , and Windows Server ® Critique and Presentation Preparation Part III

https://www.homeworkmarket.com/content/pos420-week-4-learning-team-unix-%25C2%25AE-linux-%25C2%25AE-and-windows-server-%25C2%25AE-critique-and-presentation-pr

 

POS/420 Week 4 Individual: Systems Administration Scripting Log

https://www.homeworkmarket.com/content/pos420-week-4-individual-systems-administration-scripting-log

 

POS/420 Week 5 Learning Team: UNIX ® , Linux ® , and Windows Server ® Critique

https://www.homeworkmarket.com/content/pos420-week-5-learning-team-unix-%25C2%25AE-linux-%25C2%25AE-and-windows-server-%25C2%25AE-critique

 

    • 11 years ago
    POS/420 Week 3 Individual: Linux ® Script Worksheet
    NOT RATED

    Purchase the answer to view it

    blurred-text
    • attachment
      joseph_afful_linux_script_worksheet.docx