Advertisement
Guest User

Untitled

a guest
Oct 9th, 2021
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. Name
  2. ----
  3. tofile - redirect standard output to a file on success
  4.  
  5. Synopsis
  6. --------
  7. tofile [-h] [-] <file> <program> [argument...]
  8.  
  9. Description
  10. -----------
  11. The 'tofile' utility is similar to the following Bourne shell expression:
  12.  
  13. <program> [argument...] > <file>`
  14.  
  15. Except that the file is not created or modified if the program fails.
  16.  
  17. The purpose of the utility is to be used in recipes for the 'make' utility.
  18. When the following recipe fails:
  19.  
  20. page.html: head.html body.html footer.html
  21. cat head.html body.html footer.html > page.html
  22.  
  23. The file 'page.html' is created no matter what and following invocations of
  24. 'make' think the file is up to date.
  25.  
  26. If you use 'tofile' instead:
  27.  
  28. page.html: head.html body.html footer.html
  29. tofile page.html cat head.html body.html footer.html
  30.  
  31. If the 'cat' utility fails, the file 'page.html' is not created or modified,
  32. and following invocations of 'make' will correctly try the recipe again.
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement