O'Reilly logo

Shell Programming in Unix, Linux and OS X, Fourth Edition by Patrick Wood, Stephen G. Kochan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

12. Loose Ends

We’ve put commands and features into this chapter that did not fit into earlier chapters. There’s no particular rationale for their order of presentation, so this is your chance to simply expand your knowledge of shell programming tricks and techniques.

The eval Command

This section describes one of the more unusual shell commands: 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 effect is that the shell scans the command line twice before executing it, which can be very useful if the script is building a command that needs to be invoked, among other purposes.

For the simple case, using eval seems to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required