-
What does Bash do when it performs alias substitution?
it replaces the name of the alias with a Unix command
-
Write the command you would use to create the files foo1.txt to foo5.txt
using brace expansion and the
touch
command.
touch foo{1,2,3,4,5}.txt
-
What does Bash do when it performs command substitution?
runs the commands inside the parentheses in a subshell and substitutes the output from
those commands for the substitution expression
-
What would you write at the command line to define the alias
ll
whose value was
ls -l
?
alias ll='ls -l'
-
Can an alias be made global?
no
-
Can a function be made global?
no
-
How is the command that follows
if
used to determine whether or not the statements between the then
and fi
keywords are executed?
if the command returns an exit status of 0 the statements are executed
-
What does the
test
command do?
analyze a logical expression and return an exit status that
tells whether the expression is true or false
-
What is the value of the exit status returned by
test
to indicate that the expression is true?
0
-
Does the command that follows
if
need to be test
?
no, it can be any command that returns an exit status