09.bash2.ans.even.RH4

Practical Guide to Fedora and Red Hat Enterprise Linux, A (4th Edition)

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Answers to Even-numbered Exercises 1. Explain the fol owing unexpected result: 2. What are two ways you can execute a shell script when you do not have execute access permission for the file containing the script? Can you exe- cute a shell script if you do not have read access permission for the file containing the script? You can give the name of the file containing the script as an argument to the shell (for example, bash scriptfile, where scriptfile is the name of the file containing the script). Under bash you can give either of the following commands: $ . scriptfile $ source scriptfile Because the shell must read the commands from the file containing a shell script before it can execute the commands, you must have read permission for the file to execute a shell script. 3. What is thele? 4. Assume that you have made the following assignment: $ person=jenny Give the output of each of the following commands: a. echo $person jenny b. echo '$person' $person c. echo "$person" jenny 9
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 5. gs. 6. Assume that the
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

09.bash2.ans.even.RH4 - 9 Answers to Even-numbered...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online