Week 5 Individual Assignment

0 / 5. 0

To: From: Date: Linux Script 1 #!/bin/sh#Display the date getDate(){ date return } info=$(uname -a) date=$(getDate) user=$(id) echo The Current Date is $date echo Username and Id: $user echo System Information: $info echo Our Current Working Directory is $PWD Output results are as shown below centertop Linux Script 2 #!/bin/bash getDate(){ date return } theDate=$(getDate) info=$(uname -a) user=$(id) cd /tmp #search for 'Mary' in /etc/passwd name='Mary' search=$(grep $name /etc/passwd) if then echo $name is a user in the system else echo $name is not a user in the system fi #display date echo The Date is $theDate #display system information echo System Information $info #display user id echo $user #display current directory echo Current Directory is $PWD Output Source is as follows: centertop Linux Script 3 #! /bin/bash getDate(){ date return } hostname=$(hostname) theDate=$(getDate) args=("[email protected]") size=${#args} if then echo You need to enter two arguments exit 64 elif then echo You need to enter two arguments exit 64 elif then echo ${args} ${args} fi #display date echo $theDate #display username echo $USER #display hostname echo $hostname Output is as follows: 251642-76352 Linux Script 4 #!/bin/bash getDate(){ date return } theDate=$(getDate) users=$(who --count) path=$PATH echo a. Windows echo b. Linux echo c. Mac OS echo d. Chrome OS read -p "Enter An Answer: " choice case $choice in "a") echo "Windows is the most popular OS in the world.";; "b") echo "Linux is the preferred choice for most developers.";; "c") echo

Related samples

Name Name von Professor Disziplin Datum Inhalt TOC o "1-3" h z u 1 Einleitung PAGEREF _Toc507996845 h 32 Chancen und Risiken der Digitalisierung PAGEREF _Toc507996846 h...

Motivation und Gesundheitsverhalten Inhaltsverzeichnis TOC o "1-3" h z u Abbildungsverzeichnis PAGEREF _Toc507269413 h 31. Gesundheit und gesundheitsbezogenes...


DESCARTES MEDITATION Student’s Name Institution Introduction This term paper reflects Descartes’ meditation. It gives a critical analysis concerning the...

Student’s Name: Professor’s Name: Course Number: Date: Schizophrenia Psychological disorders are a pattern of irregular thoughts and behaviors which impede a...


Leave feedback

Your email address will not be published. Required fields are marked *