Reader small image

You're reading from  Linux Command Line and Shell Scripting Bible - Third Edition

Product typeBook
Published inJan 2015
PublisherWiley
ISBN-139781118983843
Edition3rd Edition
Tools
Right arrow
Authors (2):
Richard Blum
Richard Blum
author image
Richard Blum

Richard Blum has more than 25 years as a network and systems administrator, currently managing Microsoft, Unix, Linux, and Novell servers for a network with more than 3,500 users. He has developed online programming and Linux courses that he teaches to students worldwide.
Read more about Richard Blum

Christine Bresnahan
Christine Bresnahan
author image
Christine Bresnahan

Christine Bresnahan has worked in the IT industry for more than 30 years and is currently an adjunct professor of Python programming and Linux system administration classes at Ivy Tech Community College in Indianapolis. She is the co-author of Linux Bible, Eighth Edition, and Linux Command Line and Shell Scripting Bible.
Read more about Christine Bresnahan

View More author details
Right arrow

Assessing Environment Variables

The bash shell also utilizes many environment variables. Although environment variables aren't commands, they often affect how shell commands operate, so it's important to know the shell environment variables. Table A.3 shows the default environment variables available in the bash shell.

Table A.3 bash Shell Default Environment Variables

...
Variable Description
* Contains all the command line parameters as a single text value
@ Contains all the command line parameters as separate text values
# The number of command line parameters
? The exit status of the most recently used foreground process
- The current command line option flags
$ The process ID (PID) of the current shell
! The PID of the most recently executed background process
0 The name of the command from the command line
_ The absolute pathname of the shell
BASH The full filename used to invoke the shell
BASHOPTS Enabled shell options in a colon-separated list
lock icon
The rest of the page is locked
Previous PageNext Chapter
You have been reading a chapter from
Linux Command Line and Shell Scripting Bible - Third Edition
Published in: Jan 2015Publisher: WileyISBN-13: 9781118983843

Authors (2)

author image
Richard Blum

Richard Blum has more than 25 years as a network and systems administrator, currently managing Microsoft, Unix, Linux, and Novell servers for a network with more than 3,500 users. He has developed online programming and Linux courses that he teaches to students worldwide.
Read more about Richard Blum

author image
Christine Bresnahan

Christine Bresnahan has worked in the IT industry for more than 30 years and is currently an adjunct professor of Python programming and Linux system administration classes at Ivy Tech Community College in Indianapolis. She is the co-author of Linux Bible, Eighth Edition, and Linux Command Line and Shell Scripting Bible.
Read more about Christine Bresnahan