SlideShare a Scribd company logo
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

Similar to Uop pos 433 week 5 linux script worksheet new

Uop pos 433 week 3 linux
Uop pos 433 week 3 linuxUop pos 433 week 3 linux
Uop pos 433 week 3 linux
ElijahEthaan
 
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Pantheon
 
Openfire xmpp server on windows server 2012 r2 with spark sso
Openfire xmpp server on windows server 2012 r2 with spark ssoOpenfire xmpp server on windows server 2012 r2 with spark sso
Openfire xmpp server on windows server 2012 r2 with spark sso
laonap166
 
7 Tips on Getting Your Theme Approved the First Time
7 Tips on Getting Your Theme Approved the First Time7 Tips on Getting Your Theme Approved the First Time
7 Tips on Getting Your Theme Approved the First Time
Dmitry Mayorov
 
Devry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsDevry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and strings
jody zoll
 
Back-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NETBack-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NET
David McCarter
 
Back-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NETBack-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NET
David McCarter
 
Pemrograman Python untuk Pemula
Pemrograman Python untuk PemulaPemrograman Python untuk Pemula
Pemrograman Python untuk Pemula
Oon Arfiandwi
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
noahjamessss
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
cskvsmi44
 
Final opensource record 2019
Final opensource record 2019Final opensource record 2019
Final opensource record 2019
Karthik Sekhar
 
Princeton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance ToolingPrinceton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance Tooling
Henry Schreiner
 
groovy & grails - lecture 13
groovy & grails - lecture 13groovy & grails - lecture 13
groovy & grails - lecture 13
Alexandre Masselot
 
Lab 1 Essay
Lab 1 EssayLab 1 Essay
Lab 1 Essay
Melissa Moore
 
PHP Lab template for lecturer log book- and syllabus
PHP Lab template for lecturer log book- and syllabusPHP Lab template for lecturer log book- and syllabus
PHP Lab template for lecturer log book- and syllabus
KavithaK23
 
Srgoc dotnet
Srgoc dotnetSrgoc dotnet
Srgoc dotnet
Gaurav Singh
 
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit SoftwaretestsEffizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
DECK36
 
OpenStack How To - PyLadies ATX
OpenStack How To - PyLadies ATXOpenStack How To - PyLadies ATX
OpenStack How To - PyLadies ATX
Anne Gentle
 
[xp2013] Narrow Down What to Test
[xp2013] Narrow Down What to Test[xp2013] Narrow Down What to Test
[xp2013] Narrow Down What to Test
Zsolt Fabok
 
Student NameClassDateVBScript IP File ReportIn the space provide.docx
Student NameClassDateVBScript IP File ReportIn the space provide.docxStudent NameClassDateVBScript IP File ReportIn the space provide.docx
Student NameClassDateVBScript IP File ReportIn the space provide.docx
emelyvalg9
 

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

Uop pos 433 week 3 linux
Uop pos 433 week 3 linuxUop pos 433 week 3 linux
Uop pos 433 week 3 linux
 
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
 
Openfire xmpp server on windows server 2012 r2 with spark sso
Openfire xmpp server on windows server 2012 r2 with spark ssoOpenfire xmpp server on windows server 2012 r2 with spark sso
Openfire xmpp server on windows server 2012 r2 with spark sso
 
7 Tips on Getting Your Theme Approved the First Time
7 Tips on Getting Your Theme Approved the First Time7 Tips on Getting Your Theme Approved the First Time
7 Tips on Getting Your Theme Approved the First Time
 
Devry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsDevry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and strings
 
Back-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NETBack-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NET
 
Back-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NETBack-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NET
 
Pemrograman Python untuk Pemula
Pemrograman Python untuk PemulaPemrograman Python untuk Pemula
Pemrograman Python untuk Pemula
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
 
Final opensource record 2019
Final opensource record 2019Final opensource record 2019
Final opensource record 2019
 
Princeton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance ToolingPrinceton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance Tooling
 
groovy & grails - lecture 13
groovy & grails - lecture 13groovy & grails - lecture 13
groovy & grails - lecture 13
 
Lab 1 Essay
Lab 1 EssayLab 1 Essay
Lab 1 Essay
 
PHP Lab template for lecturer log book- and syllabus
PHP Lab template for lecturer log book- and syllabusPHP Lab template for lecturer log book- and syllabus
PHP Lab template for lecturer log book- and syllabus
 
Srgoc dotnet
Srgoc dotnetSrgoc dotnet
Srgoc dotnet
 
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit SoftwaretestsEffizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
 
OpenStack How To - PyLadies ATX
OpenStack How To - PyLadies ATXOpenStack How To - PyLadies ATX
OpenStack How To - PyLadies ATX
 
[xp2013] Narrow Down What to Test
[xp2013] Narrow Down What to Test[xp2013] Narrow Down What to Test
[xp2013] Narrow Down What to Test
 
Student NameClassDateVBScript IP File ReportIn the space provide.docx
Student NameClassDateVBScript IP File ReportIn the space provide.docxStudent NameClassDateVBScript IP File ReportIn the space provide.docx
Student NameClassDateVBScript IP File ReportIn the space provide.docx
 

More from shyaminfopvtltd

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

More from shyaminfopvtltd (18)

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

Recently uploaded

What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 

Recently uploaded (20)

What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.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