Processes and Unix Shell Script Conclusion
This module discussed how to determine your login shell, run a new shell interactively from the command line, and run a shell script using three different techniques. You also learned what a process is, the relationship between parent and child processes, and that parent processes pass their exported variables down to their children. Finally, you learned how the PATH variable affects your scripts and how to redefine the PATH in a shell script.
This module introduced you to the following commands:
This module introduced the following terms:
- process: A process, in simple terms, is an instance of a running program. The operating system tracks processes through a five-digit ID number known as the pid or the process ID. Each process in the system has a unique pid.
- shell prompt: The shell prompt (or command line) is where one types commands. When accessing the system through a text-based terminal, the shell is the main way of accessing programs and doing work on the system.
- interactive shell: An interactive shell is simply any shell process that you use to type commands, and get back output from those commands.
- command line: The command line is a text interface for your computer. It is a program that takes in commands, which it passes on to the computer's operating system to run. From the command line, you can navigate through files and folders on your computer, just as you would with Windows Explorer on Windows or Finder on Mac OS.
- command line interface: A CLI (command line interface) is a user interface to a computer's operating system or an application in which the user responds to a visual prompt by typing in a command on a specified line, receives a response back from the system, and then enters another command.
- foreground process:Foreground-background is a scheduling algorithm that is used to control an execution of multiple processes on a single processor.
- background process:A background process is a computer process that runs behind the scenes and without user intervention.
Typical tasks for these processes include logging, system monitoring, scheduling, and user notification.
- child process: A child process in unix is a process created by another process (the parent process). This technique pertains to multitasking operating systems, and is sometimes called a subprocess or traditionally a subtask.
- parent process:a parent process is a process that has created one or more child processes.
- startup file:
|Startup (in this order):
|/etc/profile (login shells)
|| Any command or script specified using the command:
trap "command" 0
|.profile (login shells)
In the next module, you will learn to embed one UNIX command inside another.
This technique is referred to as embedded command execution.
Shells Processes - Quiz