-
Glossary of Unix programming
command separator
Indicates where one command ends and another begins. The most common command separator is the semicolon character, ;.
command substitution
The process by which the shell executes a command and substitutes in the output of the command.
comment
A statement that is embedded in a shell script but should not be executed by the shell.
complex command
A command that consists of a command name and a list of arguments.
compound command
A list of simple and complex commands separated by the semicolon character, ;.
compound expression
Consists of one or more expressions.
conditional execution
Alters the execution of a script, based on the system type. A script that uses conditional execution usually consists of an if statement at the beginning that sets variables to indicate the commands that should be used on a particular platform.
-
Glossary of Unix programming
cp
The command used to copy files.
daemon
A system-related background process that often runs with the permissions of root and services requests from other processes.
debugging hook
A function or set of commands that executes only when a shell script executes with a special argument. Debugging hooks provide a convenient method for tracing the execution of a script in order to fix problems.
default behavior
The output that is generated when a command runs as a simple command is called the default behavior of that command.
directory
A type of file used to store other files. For users familiar with Windows or Mac OS, UNIX directories are equivalent to folders.
directory tree
UNIX uses a hierarchical structure for organizing files and directories. This structure is often referred to as a directory tree. The tree has a single root node, the slash character (/), and all other directories are contained below it.
environment variable
A variable that is available to any program that is started by the shell.
escape sequence
A special sequence of characters that represents another character.
-
Glossary of Unix programming
escaping
Escaping a character means to put a backslash (\) just before that character. Escaping can either remove the special meaning of a character in a shell command or it can add special meaning as we saw with \n in the echo command. The character following the backslash is called an escaped character.
execute permission
In UNIX, only those files that have execute permission enabled can run.
exporting
A variable is placed in the environment by exporting it using the export command.
expression
A piece of code that are evaluated to produce a numeric result, such as 0 or 1. Some expressions that involve mathematical operations can produce other results.
field
A set of characters that are separated by one or more field separator characters. The default field separator characters are Tab and Space.
field separator
Controls the manner in which an input line is broken into fields. In the shell, the field separator is stored in the variable IFS. In awk the field separator is stored in the awk variable FS. Both the shell and awk use the default value of Space and Tab for the field separator.
file descriptor
An integer that is associated with a file. Allows you to read and write from a file using the integer instead of the filename.
filesystem
A directory structure contained within a disk drive or disk area. The total available disk space can be composed of one or more filesystems. A filesystem must be mounted before it can be accessed. To mount a filesystem, you must specify a directory to act as the mount point. Once mounted, any access to the mount point directory or its subdirectories will access the separate filesystem.
-
Glossary of Unix programming
Glossary of Unix programming
hard link
A directory entry which maps a filename to an inode number. A file may have multiple names or hard links. The link count gives the number of names by which a file is accessible. Hard links do not allow multiple names for directories and do not allow multiple names in different filesystems.
home directory
Your home directory is the directory that you start out in after you log in.
infinite loop
A loop that executes forever without terminating.
inode
A table entry within a filesystem that contains file information such as the owner, group, permissions, last modification date/time, last access date/time, and the block list of the actual file data. There is one inode for each file. The inodes are numbered sequentially. The inode does not contain the filename. A directory is a table that maps filenames to inode numbers.
input redirection
In UNIX, the process of sending input to a command from a file.
-
Glossary of Unix programming
Glossary of Unix programming
interactive mode
In interactive mode, the shell reads input from you and executes the commands that you specify. This mode is called interactive because the shell is interacting with a user.
invisible or hidden file
A file whose name starts with the . character. By default the ls command does not list these files. You can list them by specifying the -a option to ls.
iteration
A single execution of the body of a loop.
kernel
The heart of the UNIX system. It provides utilities with a means of accessing a machine’s hardware. It also handles the scheduling and execution of commands.
Korn shell
A user interface for UNIX with extensive scripting (programming) support. Written by David G. Korn. The shell features command-line editing and will also accept scripts written for the Bourne shell.
library
A file that contains only functions. Usually libraries contain no main code.
literal character
A character with no special meaning and which causes no extra action to be taken. Quoting causes the shell to treat a wildcard as a literal character.
-
Glossary of Unix programming
local variable
A variable that is present within the current instance of the shell. It is not available to programs that are started by the shell.
loop
Enables you to execute a series of commands multiple times. Two main types of loops are the while and for loops.
ls
The command used to list the files in a directory.
main code
Consists of all the commands in a shell script that are not contained within functions.
major number
UNIX uses this to associate a block special file or a character special file with a device driver.
man page
Every version of UNIX comes with an extensive collection of online help pages called man pages (short for manual pages). The man pages are the authoritative source about your UNIX system. They contain complete information about both the kernel and all the utilities.
metacharacter
In a regular expressions, a metacharacter is a special character that is expanded to match patterns.
-
Glossary of Unix programming
minor number
UNIX uses this to associate a block special file or a character special file with a device driver.
mv
The command used to rename files.
nested loop
When a loop is located inside the body of another loop it is said to be nested within another loop.
newline character
Literally the linefeed character whose ASCII value is 10. In general, the newline character is a special shell character that indicates a complete command line has been entered and it may now be executed.
no-op
A command that does nothing and thus can be used as a dummy command or placeholder where syntax requires a command.
noninteractive mode
In noninteractive mode, the shell does not interact with you, rather it reads commands stored in a file and executes them. When it reaches the end of the file, the shell exits.
numeric expression
A command used to add, subtract, multiply, and divide two numbers. Numeric expressions are constructed using the numeric operators—+ (add), – (subtract), * (multiply), and / (divide).
-
Glossary of Unix terms
ordinary file
A file on the system that contains data, text, or program instructions.
output redirection
In UNIX the process of capturing the output of a command and storing it in a file is called output redirection, because it redirects the output of a command into a file instead of the screen.
parent process
Process that controls another often referred to as the child process or subprocess. See process.
parent process identifier
Shown in the heading of the ps command as PPID. The process identifier of the parent process. See also parent process.
parent shell
Shell (typically the login shell) that controls another, often referred to as the child shell or subshell. See shell.
piping
The process used to redirect the output of one command into the input of another command. Piping is accomplished with the pipe character, |.
process
A discrete running program under UNIX. The user’s interactive session is a process. A process can invoke (run) and control another program that is then referred to as a subprocess. Ultimately, everything a user does is a subprocess of the operating system.
process identifier
Shown in the heading of the ps command as pid. The unique number assigned to every process running in the system.
prompt
When you see a prompt, you can type the name of a command and press Enter. In this book, we will use the $ character to indicate the prompt.
-
Glossary of Unix terms
PS2 variable
A shell variable whose content is usually the > character. The contents of the PS2 variable is displayed by the shell as a secondary prompt that indicates the previous command was not complete and the current command line is a continuation of that command line.
pwd
The pwd command prints the absolute path of the current directory.
quoting
Literally, to enclose selected text within some type of quotation marks. When applied to shell commands, quoting means to disable shell interpretation of special characters by enclosing the character within single or double quotes or by escaping the character.
read permission
The read permission of a file or directory determines which users can view the contents of that file or directory.
regular expression
A string that can describe several sequences of characters.
regular file
The most common type of files you will encounter. These files store any kind of data. This data may be stored in plain text, an application-specific format, or a special binary format that the system can execute.
relative path
Relative pathnames let you access files and directories by specifying a path to that file or directory relative to your current directory.
remainder function
The remainder of a division operation, which is the amount that is left over and thus not evenly divisible.
reserved word
A nonquoted word that is used in grouping commands or selectively executing them, such as: if, then, else, elif, fi, case, esac, for, while, until, do, or done.
-
Glossary of Unix programming
rm
The command used to remove files.
scalar variable
A scalar variable can hold only one value at a time.
sed
The sed command is a stream editor that allows you to modify input lines using regular expressions.
set group ID (SGID)
The SGID permission causes a script to run with its group set to the group of the script, rather than the group of the user who started it.
set user ID (SUID)
The SUID permission causes a script to run as the user who is the owner of the script, rather than the user who started it.
shell
Provides you with an interface to the UNIX system. It gathers input from you and executes programs based on that input. After a program has finished executing, the shell displays that program’s output. The shell is sometimes called a command interpreter. See also bash, Bourne shell, C shell, Korn shell, and tcsh.
shell initialization
After a shell is started it undergoes a phase called initialization to set up some important parameters. This is usually a two step process that involves the shell reading the files /etc/profile and .profile.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks