Order Now

Week 5 Individual Assignment

Category:

0 / 5. 0

Words: 550

Pages: 2

300

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 [ $? -eq 0 ] 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=(“$@”)
size=${#args[@]}
if [ “$size” -lt 2 ]
then echo You need to enter two arguments
exit 64
elif [ “$size” -gt 2 ]
then echo You need to enter two arguments
exit 64
elif [ “$size” -eq 2 ]
then echo ${args[1]} ${args[0]}
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.

Wait! Week 5 Individual Assignment paper is just an example!

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 “Mac OS is like a child of Windows and Linux :D.”;;
“d”) echo “An entry into the Os market. Seems to be promising.”;; *) echo “Please choose one of the options.”;; esac #Display The Current Date and Time
echo $theDate #Display The Number of Users
echo $users
#Display Path Files
echo $path
00
00
References
Siever, E., Weber, A., Figgins, S., Love, R., & Robbins, A. (2005). Linux in a Nutshell. ” O’Reilly Media, Inc.”.

Get quality help now

Catherine Pirelli

5.0 (584 reviews)

Recent reviews about this Writer

I’m used to dealing with my papers myself, especially when it goes about reviews, but I just got myself in the situation when a deadline was looming, and I had plenty of other assignments that are no less important. And know what? AnyCustomWriting authors managed to deliver it in 3 hours!

View profile

Related Essays

analyze argument

Pages: 10

(2750 words)

Popular Culture

Pages: 3

(825 words)

physician assisted suicide (pas)

Pages: 4

(1100 words)

School Bullys

Pages: 2

(550 words)

Art analysis

Pages: 3

(825 words)

Analysis of The Actor Network Theory

Pages: 5

(1375 words)