~/ learn/ comp-325/ cards/ Bourne Shell Programming I: Variables, Arguments, Control Flow
1 of 60

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/12991c80-2c3b-4a05-be66-17edbe6db71e/flashcard utf-8 LF