keywords:
Bookmark and Share



Front Back
What environment variable contains the PID of the running shell? 
 $
What environment variable holds the exit value of the last command? 
 ?
What command do you use in the c shell to assign a variable a value? 
 set
What command in the c shell to export variables? 
 setenv
What command removes a variable from the Bash shell? 
 unset -v
What command removes a function from the Bash shell? 
 unset -f
How do you generate an error for undefined variables? How do you disable this? 
 set -u / set+u
What script is run in Bash once a user logs off? 
 ~/.bash_logout
What file would allow you to control what certain keystrokes do? 
 /etc/inputrc or ~/.inputrc
Where are aliases/functions typically stored for a user? 
 ~/.bashrc
What command would test to determine if a file is not empty? 
 test -s [FILE]
What terminates an if statement? 
 fi
What specifies another nested `if` statement if the first statement is false? 
 elif
What terminates a case statement? 
 esac
What are two ways of performing command substition? 
 $() and ` `
What command allows you to break a loop immediately? 
 break
What command allows you to bypass remaining statements in a command and skip to the next iteration?
continue
How do you source a script to run in the current shell environment?
. [scriptname] or source [scriptname] \\0
What is the syntax used while specifying a shell to use in a script?
#!/[shellLocation]
Displaying the contents of /etc/shells will show what?
all shells installed on the system \\0
What command will allow you to change your default shell on the fly? 
 chsh [shell] -- this updates /etc/passwd
x of y cards