~/ learn/ comp-325/ cards/ Running a script, and what a variable really holds
1 of 9

All three routes to running one script, plus the tracing flag

All three routes to running one script, plus the tracing flag

Answer

sh greet chmod u+x greet ./greet sh -x greet

Line 1 needs only read permission. Line 3 needs the execute bit and the leading ./, because . is not on PATH. Line 4 runs the script with tracing on, printing each line as it executes — the first thing to reach for when a script misbehaves and you cannot see why.

S&K 3e ch12 §12.2–12.3.1

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/e3e1afe9-7d76-4986-bf7e-cb2384665a70/flashcard utf-8 LF