Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Name
- ----
- tofile - redirect standard output to a file on success
- Synopsis
- --------
- tofile [-h] [-] <file> <program> [argument...]
- Description
- -----------
- The 'tofile' utility is similar to the following Bourne shell expression:
- <program> [argument...] > <file>`
- Except that the file is not created or modified if the program fails.
- The purpose of the utility is to be used in recipes for the 'make' utility.
- When the following recipe fails:
- page.html: head.html body.html footer.html
- cat head.html body.html footer.html > page.html
- The file 'page.html' is created no matter what and following invocations of
- 'make' think the file is up to date.
- If you use 'tofile' instead:
- page.html: head.html body.html footer.html
- tofile page.html cat head.html body.html footer.html
- If the 'cat' utility fails, the file 'page.html' is not created or modified,
- and following invocations of 'make' will correctly try the recipe again.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement