click below
click below
Normal Size Small Size show me how
IT244 11/18 Quiz
IT244 Quiz
| Question | Answer |
|---|---|
| What parameter gives the status code returned by the last command run? | ? |
| What parameter gives the total number of arguments passed to a script from the command line? | # |
| What parameter gives the full pathname of the script that is currently being run? | 0 |
| What parameter gives the first command line argument to a script or function? | 1 |
| If you wanted to use the value of the variable team inside quotes, what kind of quotes would you use? | double quotes "" |
| If you wanted to remove the value of the variable team, what would you type at the command line? | team= or unset team |
| What is the name of the first process created when the machine starts? | init or systemd |
| Can two processes running at the same time have the same process ID number? | no |
| Can a process ID number be reused after the process has finished? | yes |
| If the process ID of your current shell is 15062, what is the PARENT process ID of a shell script you run from your current shell? | 15062 |
| What command would you run to see the last 20 commands you ran at the command line? | history 20 |
| What is the PATHNAME of the file that, by default, stores the commands you have run in a file so that they will be remembered for the next time you log in? | ~/.bash_history |
| What command would you use to edit the last command to run, change it and run it again? | fc |
| What is the name of the library of procedures that allows you to edit the command line? | The Readline Library |
| Name the three things that can be completed at the command line by hitting Tab. | pathnames, commands, shell variables |
| What do you call a shortcut that is used to run a command? | an alias |
| What would you write at the command line to create the alias ghdir which changed directory to MY home directory? | alias ghdir='cd ~ghoffman' |
| Can you write a function on a SINGLE command line? | yes, if every command is followed by a ; including the last |
| Can aliases be made global? | no |
| Can functions be made global? | yes, if you use export -f |