Q&A

Q1:I'm trying to write a long shell script, and it's not working as I expect it to. Are there any tools to help me see exactly what the shell is doing when my script is running?
A1: Yes. Inserting the special command set -x into your shell script causes the shell to display everything it does afterward, one line at a time, as your script is running. Inserting the special command set +x later in your script turns this debugging feature off again.
Q2:When I try to use quotes at the command line, I often end up trapped by a strange prompt that doesn't seem to accept any commands. Why?
A2: If you're stuck at a prompt that looks like a greater-than symbol, it means you've used unbalanced quotes somewhere in your command. They can take the form ...

Get SAMS Teach Yourself Red Hat® Fedora™ 4 Linux® All in One now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.