Question: Linux / Unix Assignment: 1. Brace expansion. Create 365 (empty) files, one for each day of 2021, named as shown below. The solution to this

Linux / Unix Assignment:

1. Brace expansion. Create 365 (empty) files, one for each day of 2021, named as shown below. The solution to this problem is similar to the example shown in your book in the Brace Expansion section of Chapter 7, but more complex. Also, that example creates directories, whereas I am asking you to create files. Use the touch command that I have demoed in class, along with brace expansion to create these files. You may use as many touch command lines as you like; my solution uses 6.

When you have the touch command lines figured out and re-executed (in an empty directory!) for the last time, please execute ls as I have done here. But be sure to copy/paste all of your touch command lines PLUS the ls shown below.

[mam-p@voyager TEST]$ ls 20210101.txt 20210315.txt 20210527.txt 20210808.txt 20211020.txt 20210102.txt 20210316.txt 20210528.txt 20210809.txt 20211021.txt 20210103.txt 20210317.txt 20210529.txt 20210810.txt 20211022.txt 20210104.txt 20210318.txt 20210530.txt 20210811.txt 20211023.txt

2. Command substitution. Create a single command line that shows the whatis output for every entry in /usr/bin. Many of the entries will not have any whatis info, indicated by an error message similar to this one:

/usr/bin/VGAuthService: nothing appropriate.

Your command line should NOT display these error messages, only the lines containing actual info about each entry in /usr/bin.

3. Arithmetic expansion. Create a single command that will calculate, then display the yearly wages for a Californian earning the minimum wage at a 10-person company if that person works 40 hours a week every week of the year. This problem will require you to do just a bit of research to figure out what the California minimum wage is. Your output, assuming your calculations are correct, should be presented like this:

A Californian working at a 10-person company in 2021 for the minimum wage would earn a total of $27040.

4. Tilde expansion. Use tilde expansion in a single command line to determine whether voyager user metcalf is a staff member or a student.

5. Parameter expansion. Use parameter expansion in a single command line to produce a couple of lines of info about YOU. (The YOU can be any group member.) Here's the output from my solution. The bolded parts are those that you must use parameter expansion to obtain. You do not have to actually bold those sections of the message.

My username on host voyager.deanza.edu is mam-p. My home directory is /home/staff/mam-p; my default shell is /bin/bash.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!