NIT1202 Operating System | Assignment
Added on 2020-05-08
11 Pages832 Words38 Views
Running head: NIT1202 OPERATING SYSTEMSUNIX Script Assignment 1: Part IISemester 2, 2017Name of the StudentName of the UniversityAuthor’s Note
1NIT1202 OPERATING SYSTEMS Table of Contents1. Bourne Again Shell Script...........................................................................................................21.1. Print the information: the home directory, path, userid, login shell together with the currentdate and time....................................................................................................................................21.2. Shell program to display eight random number between range inputted by the user withdifference of 100..............................................................................................................................31.3. Printing the highest and the lowest numbers of the generated eight random numbers............41.4. Exit the program.......................................................................................................................6Output Results.................................................................................................................................7Bibliography..................................................................................................................................10
2NIT1202 OPERATING SYSTEMS 1. Bourne Again Shell Script1.1. Print the information: the home directory, path, userid, login shell together withthe current date and time#!/bin/bash#Author's Name: Kiran Gautam#Student_ID s458158#Date: Oct 2017#This script generates different information such as # home directory, path, userid, login# shell with the current date and time# function for displaying a line of astericsecho "Please choose any of the options"option=("Option 1" "Option 2" "Option 3" "Option 4")select option in "${option[@]}"dofunction ln(){echo "*******************************"}
3NIT1202 OPERATING SYSTEMS case $option in"Option 1") clearecho "Display the home directory : $(ls)"ln # function calledecho "Diplay the path : $(echo $PATH)"lnecho "userid : $(id -u)"lnecho "login shell with current date and time:"wholn ;;1.2. Shell program to display eight random number between range inputted by theuser with difference of 100"Option 2") #This script is created to accept a range #from user and diplay eight random numbers between the range#Author: Student_Name Kiran Gautam#Student_ID s458158#Date: Oct 2017
End of preview
Want to access all the pages? Upload your documents or become a member.
Related Documents
UNIX Script Assignment: Part 2 - NIT1202 Operating Systemslg...
|9
|840
|374
NIT1202 Operating Systems Sample Assignmentlg...
|10
|593
|75