Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

12. Using Commands To Generate Arguments > Deferred Command Substitution

Deferred Command Substitution

In the most direct form of command substitution, the output of a command that generates arguments is substituted immediately into the command that uses the arguments. The strategy of saving the arguments in a file and inserting the file’s contents into another command decouples argument generation from argument use, which in effect defers command substitution. This method was used in the previous section for reasons of efficiency (to avoid running a lengthy find command more than once), but the method is useful in other situations as well. For example, you can examine the argument list to check it, or to modify the list before passing it to another command. These techniques are discussed below.

Verifying the Argument List


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint