Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN BASH. CYGWIN PLEASE 1.a Open a shell window IT IS ESSENIAL to save all your work pertaining to this course in a separate folder

image text in transcribedimage text in transcribed

IN BASH. CYGWIN PLEASE

1.a Open a shell window IT IS ESSENIAL to save all your work pertaining to this course in a separate folder (or sub folder) in your machine so you are not mixing up this course' work files with any other files in your machine. To create your work folder first identify the drive you want to save your work (I cannot say that, you must decide that - e.g. C:/ or D:/ etc.). Then change to the identified folder/sub folder (use cd command) within the drive you selected and type the following: Type all the following commands in One Shell window and then take a single snap shot. 1.b. Type mkdir cisa3309 1.c Type cd cisa3309 1.d Type mkdir bash 1.e Type cd bash From now onwards, all your work files of the bash section in this course MUST be saved in the /cisa3309/bash folder. 2. Type all the following commands in One Shell window and then take a single snapshot. 2.a Type date in front of the $ (or \%) sign. 2.b type cd and change directory to a directory that has some files (not an empty directory) 2.c type whereis bash (This should give you the location(s) where the bash.exe is found) 2.d type Is/bin 2.e type /s /etc 2.f type Is -la 2.g select any ascii file (with extension .txt, .xml, .xsd etc) in your directory and type less > 2.h type file (Use the same file name used in 2.g) 2.i type whoami (this should give your user id) 3. a. Open any editor (such as notepadotepad++, gedit or any other) and type the first example in section 3.2.1 in class note page 21 (bash_sec_03_example_1.sh). b. Do all steps in sections 3.2.2 and 3.2.3 in class note page 21. Take a screen shot of the result. c. After steps 3.a and 3.b are completed do the following...s type less a> (Take a screen dump of this this step) 4.0 Write a bash script named pattern.sh to print rows of asterisks to match the pattern below: You must produce your output to match exactly as shown below for full credit. Have the title here Have your name here (No need to use loops etc. Expected only a bunch of echo statements) 5.0 Write a bash script called greeting.sh that prints - a greeting to the user by (user) name, (Such as Good Morning rainyday) - prints the current date, and - prints a list of users currently running processors on your computer (use ps command) Note: If there are no users in the system you are working on except you, the list will be empty. For example, your output might look like the following if there are other users (Specially in a distributed system): He 110 rainyday Todays's date: Sat Jan 14 08:31:32 CST 2023 Be sure to add comments to your script! Comments in bash scripts begin with \#, except on the very first line. 1.a Open a shell window IT IS ESSENIAL to save all your work pertaining to this course in a separate folder (or sub folder) in your machine so you are not mixing up this course' work files with any other files in your machine. To create your work folder first identify the drive you want to save your work (I cannot say that, you must decide that - e.g. C:/ or D:/ etc.). Then change to the identified folder/sub folder (use cd command) within the drive you selected and type the following: Type all the following commands in One Shell window and then take a single snap shot. 1.b. Type mkdir cisa3309 1.c Type cd cisa3309 1.d Type mkdir bash 1.e Type cd bash From now onwards, all your work files of the bash section in this course MUST be saved in the /cisa3309/bash folder. 2. Type all the following commands in One Shell window and then take a single snapshot. 2.a Type date in front of the $ (or \%) sign. 2.b type cd and change directory to a directory that has some files (not an empty directory) 2.c type whereis bash (This should give you the location(s) where the bash.exe is found) 2.d type Is/bin 2.e type /s /etc 2.f type Is -la 2.g select any ascii file (with extension .txt, .xml, .xsd etc) in your directory and type less > 2.h type file (Use the same file name used in 2.g) 2.i type whoami (this should give your user id) 3. a. Open any editor (such as notepadotepad++, gedit or any other) and type the first example in section 3.2.1 in class note page 21 (bash_sec_03_example_1.sh). b. Do all steps in sections 3.2.2 and 3.2.3 in class note page 21. Take a screen shot of the result. c. After steps 3.a and 3.b are completed do the following...s type less a> (Take a screen dump of this this step) 4.0 Write a bash script named pattern.sh to print rows of asterisks to match the pattern below: You must produce your output to match exactly as shown below for full credit. Have the title here Have your name here (No need to use loops etc. Expected only a bunch of echo statements) 5.0 Write a bash script called greeting.sh that prints - a greeting to the user by (user) name, (Such as Good Morning rainyday) - prints the current date, and - prints a list of users currently running processors on your computer (use ps command) Note: If there are no users in the system you are working on except you, the list will be empty. For example, your output might look like the following if there are other users (Specially in a distributed system): He 110 rainyday Todays's date: Sat Jan 14 08:31:32 CST 2023 Be sure to add comments to your script! Comments in bash scripts begin with \#, except on the very first line

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions