Chapter 13. Loose Ends

We've put commands and features into this chapter that for one reason or another did not logically fit into earlier chapters. There's no particular rationale for their order of presentation.

The eval Command

This section describes another of the more unusual commands in the shell: eval. Its format is as follows:

eval command-line

where command-line is a normal command line that you would type at the terminal. When you put eval in front of it, however, the net effect is that the shell scans the command line twice before executing it.[1] For the simple case, this really has no effect:

$ eval echo hello

But consider ...

Get Unix Shell Programming, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.