subject

A shell script named hw6.sh that performs the operations listed below.
This file should be in an hw6 directory inside your hw directory inside your it244 directory.
100 points

Requirements

Create an hw6 directory in your hw directory inside your it244 directory

Go to the hw6 directory and run Unix commands that will execute the steps below

When you have a command line that does what the step asks you to do, paste it into hw6.sh using nano or any other text editor

When you have completed all the steps, create an echo statement before the commands for each step, that will print the step number to the terminal

Testing

The script hw6.sh must have the format specified in this document

Scripts that do not follow the rules specified in the document mentioned above will will have points deducted from their score

Be sure to test your script and correct any errors you find

You will lose 5 points for each error that occurs when running your script

To run your script and see only the error messages run the following command

bash hw6.sh > /dev/null
Steps for Script

1. Copy bother10.sh from /home/ghoffman/course_files/it244_f iles to your hw6 directory.
Run this program in the background redirecting output to /dev/null.
Be sure you copy and run bother10.sh, NOT bother. sh.

2. Run a command that shows the job number of the process running bother10.sh.

3. Run a command that shows the process ID of the process running bother10.sh.

4. Copy the script make_foo. sh from ~ghoffman/course_files/it244_files to your current directory.
Run this script.
Using touch, create the file foo. txt.
Perform a long listing of all files whose name starts with the string "foo" using meta-characters.

5. Using meta-characters, perform a long listing of all files whose name starts with the string "foo", followed by a single character, followed by .txt .

6. Using meta-characters, perform a long listing of all files whose name starts with the string "foo", followed by a single digit, either 1, 3 or 5, followed by .txt .

7. Using meta-characters, perform a long listing of all files whose name starts with the string "foo", followed by a single digit from 1 through 5 followed by .txt . Do this using the range feature of one of the meta-characters.

8. Using meta-characters, perform a long listing of all files whose name starts with the string "foo" followed by a single digit, not 1, nor 3 nor 5, followed by .txt .

9. Using meta-characters, perform a long listing of all files whose name starts with the string "foo" followed by two digits followed by .txt .

10. Using meta-characters, perform a long listing of the files foo21.txt, foo25.txt and foo29.txt. This must be done using a single command.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Matlab question: use switch and anythe lottery game matches three different integer numbers between 1 and 10. winning depends on how many matching numbers are provided by a player. the player provides three different integers between 1 and 10.if there is a match of all 3 numbers, the winning $ 1000.if there is a match with 2 numbers, the winning $ 10.if there is a match of all with 1 numbers, the winning $ 1.with no match, the winning is $0.write a function lottery3 that checks three numbers provided by a player and determine the winning amount. if the user mistakenly enters same number twice/thrice and if that number matches one of the winning numbers, the code should count that number only once and display correct result. the player doesn’t have to guess the order of numbers.the input to the function lottery3 can have up to two input arguments. the first input argument is a row array numbers with 3 numbers. if the second argument input testcode is present, and is a row vector of 3 values, the function lottery3 uses the code in testcode as the three winning numbers (the test must be three different integer numbers between 1 and 10), else three different numbers will be automatically generated by testcode.the ouput should return the variable winnings and the three winning numbers in the row array winnumbers.hint: make use of the internal function any.restriction: the function must use switch-case statements to determine the winning.example #1: winning = lottery3( [1,2,1],[1,2,3])produceswinning =10example #2: [winning,winnumbers] = lottery3( [1,2,3])produceswinning =3winnumbers =8 5 3
Answers: 1
question
Computers and Technology, 22.06.2019 12:30
An atom's diameter is about 0.1 nanometer (1×10-9m), and a human hair is about 1×10-3m. how many times greater is a human hair than an atom's diameter? sorry pushed wronf button but this is math
Answers: 3
question
Computers and Technology, 22.06.2019 21:00
Ulia is planning to attend the same private four-year college her parents attended. she wants to save at least $18,000 in four years to contribute to her college education. which monthly deposit amounts can julia use to achieve her goal? check all that apply.
Answers: 2
question
Computers and Technology, 23.06.2019 18:40
How does is make you feel when you're kind to others? what are some opportunities in your life to be more kind to your friends and loved ones? imagine a world where kindness has be outlawed. how would people act differently? would your day-to-day life change significantly? why or why not?
Answers: 2
You know the right answer?
A shell script named hw6.sh that performs the operations listed below.
This file should be in...
Questions
question
Mathematics, 20.09.2020 16:01
Questions on the website: 13722362