Chapter 11 Flashcards
A blank is a program written in an interpreted language, typically associated with a shell or other programs whose primary purpose is something other than as an interpreted language
script
In Linux, many scripts are blank, which are associated with Bash or another shell.
shell scripts
Shell scripts are blank, so you can create them in text editors, such as vi, nano, or pico
plain-text files
You shouldn’t use word processing programs to create shell scripts because they embed blank in the final document.
binary code
The first two characters of the command to a script are blank and is known as a blank
!
shebang
When you’re done writing the shell script, you should modify it so that it’s executable with the blank command.
chmod
One of the most basic features of shell scripts is the ability to blank
run commands
Aside from the shebang, the script looks like commands that you would normally type except for what?
scripts list complete paths
If your script produces a no such file or directory error, you can use the blank command where command is the offending file
which
Each command in a script ends in a blank symbol, which tells the script to go to the next line(command)
ampersand (&)
The blank commands, such as ls, mv, cp, and rm are often used in scripts.
file manipulation commands
The blank command locates files that contain the string you specify, or it displays the lines that contain those strings in a single file
grep
The blank command searches for a patterns based on filenames, ownership, and similar characteristics
find
The blank command extracts text from fields in a file
cut
The blank program provides many of the capabilities of a conventional text editor but via commands that can be typed at a command prompt or entered in a script
sed
The blank command is a tool to use when a script must provide a message to the user
echo
The blank command can be used to send email from within a script
Blank can help you expand the utility of scripts
variables
Variable’s blank can be passed as parameters to a script, generated internally to a script, or extracted from a script’s environment
values
Another type of variable that can be set from the output of a command is also identified by blank, but typically is given a name that at least begins with a letter
leading dollar signs
In addition to assigning variables with the equal sign, you can read variables from a standard input using the blank command
read