We're learning shell expansions in class, but I missed it because I wasn't feeling well. Help would be greatly appreciated.
Suppose you were to type the following commands at the command line (from any location in your directory):
$ mkdir 'expansions $11po$'
$ touch a{b,c,d}e z{a,i}{p,t}
$ unalias lsh
$ alias lsh='ls -a'
$ alias lhl='lsh -l'
$ filesl=*a*
$ files2=a 9 stt<..p]..oqs<
$ cp ../testFiles/test. l1
$ rm *e*
Name:
Graded By
You should list each expansion step as shown in the previous examples. You *may not* need every line that has been provided (but you might). PLEASE INDICATE YOUR FINAL COMMAND.
Command_12: Expansion
14: $echo $files2
110:1:t Result
History
What follows are three commands. For each one, you may assume they were entered as command # 12. A partial list of expansions has been provided for the first 2 problems. Your job is to fill in the missing expansion types and results of applying the expansions. Sometimes you will have to fill one or the other, sometimes you'll have to fill in both. For problem 3, you will have to fill in every step. You may work in pairs/groups on this, but everyone must turn in their own worksheet on the due date.
Command_12: Expansion
lhl cat ???? Result
Alias lsh -1 cat ???? is-a-1cat2 Command (Applies expansions within command) Expansion Result
1s -a -1 (Runs the command) ls -a -1
Final Command:
BONUS POINT:
After the command in the third exercise, what is the result of running "more test"? Include your answer below:
Command_12: Expansion
:0$files1 Result
Sfilesl
FINAL COMMAND: Filename