Chapter 9 - Writing Scripts, Configuring Email, & Using Databases Flashcards
what do environmental variables provide?
9-454
the means to pass named data to programs launched from a shell or a subshell
what is a subshell?
9-454
a child process that is created by either the shell or a shell script when a program is initiated
you’ve set an environment variable manually via an equal-sign assignment operator. what command must you use to make that variable to subshells?
9-455
the export command
how can you find out how environment variables are configured? (what do you type?)
9-455
env, set, or printenv
if you want to know the value of one variable, you can use the echo command, but how do you use it?
9-458
echo $variable
tell me 3 times when you would use an alias
9-459
- to assign names that are easier to remember in order to obscure commands
- to implement desirable command options as a command’s default
- to create a shortened version of a command to minimize typing
you are configuring shells via shell configuration files. tell me the 2 ways they are classified (4 combinations).
9-460
whether they are global or user files and whether they have login or non-login file locations
how can you see your current key bindings?
9-462
bind -p
true/false: most minux systems use bash by default
9-462
true
you are looking at a shell script. what tells the linux kernel that it is a shell script?
9-463
it begins with a #!
tell me 6 commands that are commonly used in scripts
9-464,465
file manipulation commands (ls, mv, cp, rm) grep find cut sed echo
is it possible to set a script’s SUID (SGID bits)?
9-465
yes
when you type the script’s name, preceded by bash, what does that do?
9-466
it tells linux to run the script in the current directory rather than searching the current path
what is a script?
9-462
a simple program written in an interpreted computer language that’s embedded in the linux shell, used for repetitive tasks
typing the script’s name, preceded by ./, tells linux what?
9-466
tells linux to run the script in the current directory rather than searching the current path