Suppose you were to type the following commands at the command line (from any location
in your directory):
1 >$ mkdir expansions
2 >$ cd !!:
3 >$ touch a{b,c,d}e z{a,i}{p,t}
4 >$ unalias lsh
5 >$ alias lsh='ls -a'
6 >$ alias lhl='lsh -l'
7 >$ files1=*a*
8 >$ files2="*a*"
9 >$ echo "*[td]*" > list
10 >$ cp ./testFiles/test .
11 >$ rm *e*
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: lhl cat ???""
Expansion
Alias
Result
lsh -l `cat ???""
ls -a -l `cat ???""
Command
(Applies expansions within command)
Expansion
Result
ls -a -l
(Runs the command)
ls -a -l
Final Command:
Command 12: !!:0 $files1
Expansion
Result
rm $files1
FINAL COMMAND:
Filename
rm
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
History
14:$ `echo $files2` > 110:1:t
Result
BONUS POINT:
After the command in the third exercise, what is the result of running more
test ? Include your answer below: