2344 Exam 2

80 flashcardsby Carter
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
UNIX/Linux store data, such as letters, product records, or vendor reports, in flat ASCII files.
True
2
Moving and renaming a file are essentially the same operation.
True
3
When you use cat to combine two files into a third file, the first line of the output contains the first line of the first file followed by the first line of the second file.
False
4
You can complete a project using awk that you cannot complete using a combination of paste, cut, sort, and join.
True
5
You can use the < operator to redirect a command's output from the screen to a file.
False
6
The pipe operator can connect several commands on the same line.
True
7
A popular use of pr is to convertt lowercase letters to upercase letters.
False
8
A high-level language is a computer language that uses English-like syntax.
False
9
Shell scripts run more quickly than compiled programs.
False
10
You should omit spaces when you assign a variable without using single or double quotation marks around the value.
True
11
The program development cycle begins with creating specifications for a program.
True
12
Pseudocode is a design tool only, and is never processed by the computer.
True
13
A .bash_logout file in each Bash user's home directory executes commands when the user logs out.
True
14
The command rmdi can be used to delete a directory that is not empty.
False
15
When you are moving files, using the -o option with the mv command can be a good idea so that you don't unexpectedly overwrite a destination file with the same name.
False
16
You can use the less command with a directory to view its contents one screen at a time, such as less /sbin.
True
17
When using wc, you cannot specify all three optionds (-l, -w an -c) in the command line at the same time.
False
18
Shell scripts can automatically access variables created and assigned on the command line.
False
19
In UNIX/Linux, all shells support the same commands and programming statements.
False
20
In UNIX/Linux, text files and binary files are considered to be ___ files.
regular
21
System administrators and programmers refer to standard input as ___.
stdin
22
You can use the ___ operator to redirect commands or program error messages from the screen to a file.
2>
23
The command > accountsfile ___.
Creates an empty file called accountsfile.
24
When you noo longer need a file, you can delete it usin ghte ___ command.
rm
25
The cp ___ option creates a symbolic link or name at the destination rather than a physical file.
-s
26
When you use find, it is useful to note that some UNIX versions require the ___ option to display the names of files.
-print
27
The ___ option of the paste command is used to specify a different separator as a delimeter.
-d
28
A sorting ___ is a field position within each line.
key
29
The join command is used to associate information in two different files on the basis of a common field or ___.
key
30
___ is NOT a selection command.
sed
31
You use the ___ command to search for a specified pattern in a file, such as a particular word or phrase.
grep
32
The ___ option of the grep command displays only lines that do not contain the search pattern.
-v
33
The ___ option of the uniq command instructs it to generate as output only the lines of the source file that are not duplicated successfully.
-u
34
The ___ option of the diff command shows lines surrounding the line that differs.
-c
35
The ___ option of the diff command ignores blanks that repeat.
-b
36
To append new lines in sed, you must use the ___ command.
a\
37
By default, each page in the output of pr has a ____-line header, which, by default, contains the current file's name, its last modification date, the current page, and a trailer consisting of blank lines.
Five
38
When using the printf function, ___ indicates that the output is to appear as a decimal digit.
%d
39
You use the ___ character in script files to mark comments.
pound (#)
40
A ____ is a name consisting of letters, numbers, or characters and is used to reference the contents of a variable.
symbolic name
41
A program's high-level language statements are stored in a file called the ___ file.
source
42
If a source file contains ___ errors, it cannot be converted into an executable file.
syntax
43
The ___ shell, when compared to the other shells, has a more powerful programming interface.
Bash
44
___ variables are used to store information about the setup of the operating system, and after they are set up, you typically do not use them.
Configuration
45
To reference a variable, you use a dollar sign ($) in front of it or enclose it in ___.
curly brackets ({ })
46
When you assign a value to a variable, you might want to evaluate by displaying it via an ___ operator.
evaluating
47
Wildcard characters are also known as ___ characters.
glob
48
The ___ statement continues to loop and execute commands or statements as long as a condition or set of conditions is true.
while
49
The ___ statement simplifies the selection of a match when you have a list of choices.
case
50
The second step in the program development cycle is ___.
The design process
51
Each step in the program is represented by a ___ in the flowchart.
symbol
52
In a flowchart, an ___ is used to indicate process flow.
arrow
53
In a flowchart, a ___ is used to represent a decision.
diamond
54
When you create a script, you should include the command that sets the particular shell to use on ___.
The first line of the script
55
For your own account the shell that is set up by default is established by the system administrator in the ___ file.
/etc/passwd
56
The .bashrc file is a hidden file contained in ___ directory.
your home
57
The ___ file is run each time you log in or give the command to set as your current shell, but not set as a subshell.
.bash_profile
58
The __ file runs when you long in using the Bash shell as the default and each time you start a bash shell.
.bashrc
59
The ___ operator of the text command combines two expressions and tests a logical OR between them.
-o
60
A function name differs from a variable name because a function name is followed by a set of ___.
parentheses
61
To redirect the list of the files in a directory called homedir.list you enter ___.
ls > homedir.list
62
You can use the ___ command to create empty files.
touch
63
The ___ optiojn of the find command displays files that have been changed within the last n minutes.
-mmin n
64
If you execute ___, the contents of file1 are sorted and the results are stored in file2
sort file1 > file2
65
The ___ command removes duplicate lines from a file.
uniq
66
The ___ command locates identically sorted files.
comm
67
The ___ option of the diff command is used to display the differences side-by-side in columns.
-y
68
By default, pr formats the specified files into single-column pages of ___ lines.
66
69
One way to run a shell script is to make it executable by using the x permission and then typing ___ prior to the script name when you run the script itself.
./
70
The UNIX/Linux shell acts as an ___ when reading script files.
interpreter
71
___ variables are those you create at the command line or in a shell script.
Shell
72
The ___ command prints a listing of environment and configuration variables.
printenv
73
With no options, ___ displays the current listing of Bsah environment and shell script variables.
set
74
The ___ command enables you to initialize the terminal display or terminal window, to place text and prompts in desired locations, and to respond to what the user selects from the menu.
tput
75
The ___ command is useful when you want your shell program to automatically remove any temporary files that are created when the shell script runs.
trap
76
The line in the script for setting the Bash shell is ___.
#!inash
77
A simple way to delete a record using ___ is with the -d (delete) option.
sed
78
To access the first argument passed to a function you have to use the positional variable.
$1
79
To access the whole list of arguments passed to a function as individual you have to use positional variables.
$@
80
To access the name of the script being executed you have to use positional variable.
$0
Study all 80 cards for free