UOP POS 433 Week 5 Linux Script Worksheet NEW
http://www.assignmentcloud.com/pos-433-
uop/pos-433-week-5-linux-script-worksheet-new
For more classes visit
http://www.assignmentcloud.com
Linux® Script 1 (2 Marks)
Requirements
Create a new file called week5prog1.sh with vi or
pico editor.
Edit your new file using VI and change it so it
performs the following actions:
• Display the date
• Display your system information using “uname
–a “ command
• Display your username and id using “id”
command
• Display your current directory
Save the file and type your file name to execute.
Source Programs:
Insert your source code here.
$ cat week5prog1.sh
Output Results:
Insert the output here. Use a screen shot of the
output with input requirements specified in the
assignment.
1. Give execute permission to the user, group only
Run the script and show the output here
Linux® Script 2 (2 Marks)
Requirements
Create a new file called week5prog2.sh with vi or
pico editor.
Edit your new file using VI and change it so it
performs the following actions:
• Display the date
• Display your system information using “uname
–a “ command
• Display your username and id using “id”
command
• Change your directory /tmp
• Display your current directory
• Search Mary in the passwd file in /etc directory
• If the search is success, display that Mary is an
user in this system
• Otherwise display that Mary is not in the system
You need to use “grep”, “if” , “else” “$?”
Linux® Script 3 (3 Marks)
Requirements
Here is the question:
Some commands like cp, mv, mkdir need
arguments. Similarly this script needs only two
arguments. If user enters no arguments or one
argument or three or more than 3 arguments, it
displays error message like “You need to enter
two arguments “ If user enters two arguments, it
displays the arguments in reverse order .
Create a new file called week5prog3.sh with vi or
pico command
Edit your new file using vi and write the script:
Create a new file called week5prog3.sh with vi or
pico command.
• Display the date
• Display your system’s host name “hostname “
command
• Display your username using system variable
“USER”
• If user enters no arguments or one argument or
three or more than 3 arguments, it displays error
message like “You need to enter two arguments “
• If user enters two arguments, it displays the
arguments in reverse order .
Linux® Script 4 (3 Marks)
Requirements
Create a new file called week5prog4.sh with vi or
pico editor
Here is the question:
Write a program which displays 4 options to the
user and asks the user to enter one option and
displays the output depending on the choice. If the
user enters any other character, display error
message that he has to enter only a, b, c or d
a. Current date and time
b. No of users currently logged in
c. List of directories in PATH variable
d. Your login name using “LOGNAME” variable
(hint : Use the case statement and read the option
with read command)
Source Programs:
Insert your source code here.
$ cat week5prog4.sh
Output Results:
Insert the output here. Use a screen shot of the
output with input requirements specified in the
assignment.
1. Give execute permission to the user, group only
2. Run the script and show the output here with
the following inputs each time when the scripts
prompts like
1st Run : Enter an option : a
2nd Run : Enter an option : b
3rd Run : Enter an option : c
4th Run : Enter an option : d
5th Run : Enter an option : x
2. Run the script and show the output here with
the following inputs each time when the scripts
prompts like
1st Run : Enter an option : a
2nd Run : Enter an option : b
3rd Run : Enter an option : c
4th Run : Enter an option : d
5th Run : Enter an option : x

More Related Content

PDF
Introduction to Web Scraping with Python
PPTX
Delete the branches from remote repositories(GIT)
PPTX
Getting Started With PowerShell Scripting
PDF
Pos 433 pos433
DOC
Uop pos 433 week 3 linux
DOC
Uop pos 433 week 3 linux
DOC
Uop pos 433 week 3 linux
DOC
Linux Lab Manual.doc
Introduction to Web Scraping with Python
Delete the branches from remote repositories(GIT)
Getting Started With PowerShell Scripting
Pos 433 pos433
Uop pos 433 week 3 linux
Uop pos 433 week 3 linux
Uop pos 433 week 3 linux
Linux Lab Manual.doc

Similar to Uop pos 433 week 5 linux script worksheet new (20)

DOCX
Quize on scripting shell
DOCX
Basic shell programs assignment 1
PPT
Bash Programming
PDF
Module 03 Programming on Linux
PPT
Shell Scripting
PPT
Best training-in-mumbai-shell scripting
PPT
Shell programming
PDF
Introduction to base shell scripting
PPT
Best training-in-mumbai-shell scripting
PPT
2-introduction_to_shell_scripting
DOC
DOCX
POS 433 Entire Course NEW
PPT
Unix Shell Scripting Basics
PPT
Unix shell scripting basics
PDF
The best unix shell scripting interview questions 2018 learn now!
PPTX
Chapter 2 Introduction to Unix Concepts
PPTX
Bash and regular expressions
PPT
34-shell-programming asda asda asd asd.ppt
Quize on scripting shell
Basic shell programs assignment 1
Bash Programming
Module 03 Programming on Linux
Shell Scripting
Best training-in-mumbai-shell scripting
Shell programming
Introduction to base shell scripting
Best training-in-mumbai-shell scripting
2-introduction_to_shell_scripting
POS 433 Entire Course NEW
Unix Shell Scripting Basics
Unix shell scripting basics
The best unix shell scripting interview questions 2018 learn now!
Chapter 2 Introduction to Unix Concepts
Bash and regular expressions
34-shell-programming asda asda asd asd.ppt
Ad

More from shyaminfopvtltd (18)

DOC
Acct 346 midterm set 1
DOC
Acct 346 midterm set 1
DOC
Arts 230 week 3 learning team assignment shaping the environment presentation
DOC
Ash ant 101 week 5 final paper new
DOC
Uop mha 610 week 6 discussion health and nutritional status new
DOC
Uop mha 610 week 6 assignment final project new
DOC
Devry acct 312 final exam answers new
DOC
Uop glg 101 week 8 check point
DOC
Uop glg 101 week 4 dqs new
DOC
Uop pos 433 week 4 file processing commands worksheet new
DOC
Uop pos 433 week 2 linux
DOC
Uop hst 275 week 2 developing cultures worksheet new
DOC
Strayer cis 558 week 10 term paper managing an it infrastructure audit
DOC
Strayer cis 558 week 4 case study 1 mitigating cloud computing risks
DOC
Strayer cis 558 week 3 assignment 1 erm roadmap
DOC
Devry gsp 215 week 7 homework networking commands new
DOC
Devry gsp 215 week 5 i lab memory new
DOC
Uop fin 571 week 6 assignment start
Acct 346 midterm set 1
Acct 346 midterm set 1
Arts 230 week 3 learning team assignment shaping the environment presentation
Ash ant 101 week 5 final paper new
Uop mha 610 week 6 discussion health and nutritional status new
Uop mha 610 week 6 assignment final project new
Devry acct 312 final exam answers new
Uop glg 101 week 8 check point
Uop glg 101 week 4 dqs new
Uop pos 433 week 4 file processing commands worksheet new
Uop pos 433 week 2 linux
Uop hst 275 week 2 developing cultures worksheet new
Strayer cis 558 week 10 term paper managing an it infrastructure audit
Strayer cis 558 week 4 case study 1 mitigating cloud computing risks
Strayer cis 558 week 3 assignment 1 erm roadmap
Devry gsp 215 week 7 homework networking commands new
Devry gsp 215 week 5 i lab memory new
Uop fin 571 week 6 assignment start
Ad

Recently uploaded (20)

PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PPTX
Introduction to pro and eukaryotes and differences.pptx
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PPTX
Computer Architecture Input Output Memory.pptx
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PDF
IGGE1 Understanding the Self1234567891011
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PDF
My India Quiz Book_20210205121199924.pdf
PDF
Empowerment Technology for Senior High School Guide
PDF
Trump Administration's workforce development strategy
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Paper A Mock Exam 9_ Attempt review.pdf.
Introduction to pro and eukaryotes and differences.pptx
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
Computer Architecture Input Output Memory.pptx
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
IGGE1 Understanding the Self1234567891011
Practical Manual AGRO-233 Principles and Practices of Natural Farming
What if we spent less time fighting change, and more time building what’s rig...
FORM 1 BIOLOGY MIND MAPS and their schemes
My India Quiz Book_20210205121199924.pdf
Empowerment Technology for Senior High School Guide
Trump Administration's workforce development strategy
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
Share_Module_2_Power_conflict_and_negotiation.pptx
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf

Uop pos 433 week 5 linux script worksheet new

  • 1. UOP POS 433 Week 5 Linux Script Worksheet NEW http://www.assignmentcloud.com/pos-433- uop/pos-433-week-5-linux-script-worksheet-new For more classes visit http://www.assignmentcloud.com Linux® Script 1 (2 Marks) Requirements Create a new file called week5prog1.sh with vi or pico editor. Edit your new file using VI and change it so it performs the following actions: • Display the date • Display your system information using “uname –a “ command • Display your username and id using “id” command • Display your current directory Save the file and type your file name to execute. Source Programs: Insert your source code here. $ cat week5prog1.sh
  • 2. Output Results: Insert the output here. Use a screen shot of the output with input requirements specified in the assignment. 1. Give execute permission to the user, group only Run the script and show the output here Linux® Script 2 (2 Marks) Requirements Create a new file called week5prog2.sh with vi or pico editor. Edit your new file using VI and change it so it performs the following actions: • Display the date • Display your system information using “uname –a “ command • Display your username and id using “id” command • Change your directory /tmp • Display your current directory • Search Mary in the passwd file in /etc directory • If the search is success, display that Mary is an user in this system • Otherwise display that Mary is not in the system You need to use “grep”, “if” , “else” “$?”
  • 3. Linux® Script 3 (3 Marks) Requirements Here is the question: Some commands like cp, mv, mkdir need arguments. Similarly this script needs only two arguments. If user enters no arguments or one argument or three or more than 3 arguments, it displays error message like “You need to enter two arguments “ If user enters two arguments, it displays the arguments in reverse order . Create a new file called week5prog3.sh with vi or pico command Edit your new file using vi and write the script: Create a new file called week5prog3.sh with vi or pico command. • Display the date • Display your system’s host name “hostname “ command • Display your username using system variable “USER” • If user enters no arguments or one argument or three or more than 3 arguments, it displays error message like “You need to enter two arguments “ • If user enters two arguments, it displays the arguments in reverse order .
  • 4. Linux® Script 4 (3 Marks) Requirements Create a new file called week5prog4.sh with vi or pico editor Here is the question: Write a program which displays 4 options to the user and asks the user to enter one option and displays the output depending on the choice. If the user enters any other character, display error message that he has to enter only a, b, c or d a. Current date and time b. No of users currently logged in c. List of directories in PATH variable d. Your login name using “LOGNAME” variable (hint : Use the case statement and read the option with read command) Source Programs: Insert your source code here. $ cat week5prog4.sh Output Results: Insert the output here. Use a screen shot of the output with input requirements specified in the assignment. 1. Give execute permission to the user, group only
  • 5. 2. Run the script and show the output here with the following inputs each time when the scripts prompts like 1st Run : Enter an option : a 2nd Run : Enter an option : b 3rd Run : Enter an option : c 4th Run : Enter an option : d 5th Run : Enter an option : x
  • 6. 2. Run the script and show the output here with the following inputs each time when the scripts prompts like 1st Run : Enter an option : a 2nd Run : Enter an option : b 3rd Run : Enter an option : c 4th Run : Enter an option : d 5th Run : Enter an option : x