nostarch_summer_sampler_2018.pdf

(15414 KB) Pobierz
MORE FROM
NO STARCH PRESS
R E A D SA MPL E CHAPT ER S F RO M
TH ES E NO STARCH B OO K S !
TH E LIN UX C OM MA ND L IN E , 2 ND E DI TI ON
WI LL I AM E. S HOT TS, J R.
BE CO ME A LIN U X WIZ AR D! A ZINE BOXS ET
JUL I A EVAN S
LIN UX B AS ICS FO R H AC K ERS :
GE TTIN G S TAR T ED WIT H N E T WORKI NG,
SC RIP TING , A ND SE CU R IT Y IN KA LI
OCC UPYT HEW EB
AB SO LU T E F RE EB S D, 3R D E DI TI ON:
TH E CO MP L ET E GU IDE T O F R EEBSD
M I C HAEL W. LUC AS
A UT OT O OL S , 2 N D E DIT ION
JOH N C ALC OTE
SEEING THE WORLD AS
THE SHELL SEES IT
In this chapter we are going to look at some of the
“magic” that occurs on the command line when you
press the
ENTER
key. While we will examine several
interesting and complex features of the shell, we will
do it with just one new command:
echo
—Display a line of text.
Expansion
Each time you type a command line and press the
ENTER
key,
bash
performs
several processes upon the text before it carries out your command. We’ve
seen a couple of cases of how a simple character sequence, for example
*
,
can have a lot of meaning to the shell. The process that makes this happen
is called
expansion.
With expansion, you enter something, and it is expanded
into something else before the shell acts upon it. To demonstrate what we
Zgłoś jeśli naruszono regulamin