5103COMP Operating Systems Assignment

Assignment Help Computer Engineering
Reference no: EM132619225

5103COMP Operating Systems - Liverpool John Moores University

Shell Scripting

Learning Outcome 1: Apply command-line tools provided by operating systems and their distributions.

Learning Outcome 2: Demonstrate problem-solving skills to create simple software solutions using command-line scripting.

Introduction

This is an individual coursework and all shell scripts should be your own work. Collaborative coding and copying code from online sources (this includes forums!) is plagiarism.

This assignment will assess your shell scripting skills as well as your knowledge of the file structure and shell tools of mainstream Linux distributions. You will be required to write bash scripts to solve the problems outlined in this specification.

Detail of the task

You need to write bash shell scripts that are able to accomplish the tasks outlined below. These script files should be submitted via the handler on Canvas. Some important points to note:
• All script files must be properly formatted and commented.
• You will lose marks if the script returns/displays information other than that requested.
• All script files must be ASCII without CRLF line endings (Unix/Linux)

Task 1 - Basic File System Control
Write a bash script for the following pseudo code:

1. # Task 1 Pseudo Code
2. Change to current user's home directory
3. Create folder named "My New Files"
4. List contents of current directory
5. Move inside the "My New Files" directory
6. For <count> to 10:
7. Create file named "File_<count>"
8. Add "This is file number: <count>" to file
9. List files and their permissions in the current directory
10. Change File_2 permissions to RWX for current user, group and others
11. Change File_4 permissions to RW for current user and group
12. Change File_8 permissions to RWX for current user
13. List files and their permission in the current directory
14. For all files in "My New Files":
15. Delete file if number in file name is odd
16. List files in current directory
17. Merge contents of all files in "My New Files" into a file called "Master"
18. Move the "Master" file to the current user's home directory
19. List the current directory
20. Show the contents of the "Master" file

Task 2 - Host Monitoring Script
Write a Bash script that displays the following information in the terminal console:

1) Machine Name, Kernel Version, Uptime and Current Time should be shown on one line using the pipe ( | ) as a delimiter.
2) The average round trip time (in milliseconds) for 4 ICMP echo/echo reply packets (ping) sent to/received from www.google.co.uk.
3) The top 5 CPU-consuming processes.
4) Both the free memory (in MB) and free swap (in MB).
5) The disk usage breakdown (in GB) of the current user's home directory.
6) Both the number of RX packets and number of TX packets for the loopback interface.
7) Both the number of listening TCP ports and number of listening UDP ports.

Task 3 - Advanced Scripting
Write the two scripts outlined below, which should perform the specified tasks:

Script 1
• Ask the user for two separate inputs: filename (string) and count (integer).
• The count input should be optional and unless specified its default should be 1. Your script should check the validity of the integer and whether a null/empty value has been supplied.
• Create an array of the same size as the count entered.
• Using an appropriate loop, populate the array with filenames (as specified in the input) in the format <filename>_<count> (e.g. myFile_1, myFile_2, ..., myFile_n)
• Pass this array to Script 2.

Script 2
• Accept the array passed from Script 1.
• Create a folder called "Task 3" in the home directory of the current user and change into this folder.
• For every filename in the array, create a file using the filename in UPPERCASE letters.
• For every file created, print the corresponding MD5 hash.
• For every file created, rename the files using lowercase letters.
• List files in the current "Task 3" directory.
• Print the words "Script" in red, "has" in blue and "finished" in green.

Attachment:- shell scripting.rar

Reference no: EM132619225

Questions Cloud

Identify elements that appear to foster employee motivation : When reviewing the descriptions of the work environments, identify elements that appear to foster employee motivation and group cohesion among employees.
What types of informal groups do you belong to in workplace : What types of informal groups do you belong to in your workplace? How do norms of the informal groups to which you belong influence your behavior.
Provide the journal entries for each year : Provide the journal entries for each year. Assume the stage of completion can be reliably determined. Exclude journal narrations
Identify actions manager can take at each stage of process : Consider the Tuckman group stage process schema as discussed in Chapter 3 of your text. Identify specific actions a manager can take at each stage.
5103COMP Operating Systems Assignment : 5103COMP Operating Systems Assignment Help and Solution, Liverpool John Moores University - Assessment Writing Service
What factors you would examine in your research : Identify a generic organization (e.g., manufacturing plant, hospital, educational institution). You will use this same organization in your Final Project.
Review problem based on the organizational design : More than ever, groups and teams are responsible for executing tasks in the workplace. Take a position on the following statement: All organizations should.
Why do you think it is important for the leader to embrace : Watch The First Follower and discuss three things you learned from the video clip, providing examples. Also, explain the chain of leadership + follower.
What is the role of leadership as it relates to vision : What is the role of leadership as it relates to vision, mission, and strategy in an organization? Give specific examples.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Evaluate the process using informal benchmarking

Describe in very general terms the as-is business process for applying for admission at your university. Collaborate with another student in your class and evaluate the process using informal benchmarking.

  Describe and define the scope of the project

Write a four to six (4-6) page original business requirements document for the project plan using the template provided.

  Display the impact speed of the first three bounces

Write test and run a c++ Program that calculation and display the impact speed of the first three bounces and the rebound height of each bounce.

  Construct a product vision statement for the product

Use an Internet search engine such as google or bing to research a product of your interest. Make sure you are capable of writing a product vision statement.

  Create two use cases for the school bus system

The bus operation involves 30 regular routes, plus special routes for activities, athletic events, and summer sessions.

  Design an algorithm to test whether a binary tree

Write a method that checks whether a binary tree. Design an algorithm to test whether a binary tree.

  Write a servlet that returns a randomly chosen greeting from

Write a servlet that returns a randomly chosen greeting from a list of five different greetings. The greeting must be stored as constant strings in the program.

  What is the thermal law explain briefly

Computer analysis of turbulent flow in a circular tube with q"0 = const and constant fluid properties: Use a mixing-length turbulence model.

  Discuss recent cyber security related events

You recently joined a local cyber security "hackers" group that meets once a month to discuss recent cyber security related events, as well as tools.

  Write a detailed report where you explain your findings

Find a readily available sentiment text data set (see Technology Insights 7.2 (page 329) in your textbook(attached document) for a list of popular data sets).

  Determine how do the teams manage their team boundaries

Consider the different teams presented in your reading assignment. How do the teams manage their team boundaries?

  Database management

Additionally to limiting the actual tables or columns that a user has access to, you may also limit what the user does. Specify some of the ROLES you could allocate to the users and what would these roles do?

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