home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / shell / 3687 < prev    next >
Encoding:
Text File  |  1992-08-29  |  849 b   |  24 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!munnari.oz.au!metro!mama!andy
  3. From: andy@research.canon.oz.au (Andy Newman)
  4. Subject: Re: How to empty a file
  5. Message-ID: <Bto5ws.4qF@research.canon.oz.au>
  6. Sender: news@research.canon.oz.au
  7. Organization: Canon Information Systems Research Australia
  8. References: <17g4kbINN4bm@seven-up.East.Sun.COM> <BtLLps.But@cs.dal.ca>
  9. Date: Fri, 28 Aug 1992 01:10:03 GMT
  10. Lines: 12
  11.  
  12. digdon@ug.cs.dal.ca (Mike Digdon) writes:
  13. [....stuff about creating empty files deleted]
  14. >You could also do:
  15. >
  16. >    echo > logfile
  17.  
  18. That method is shell specfic. If your shell uses /bin/echo (i.e.
  19. Bourne shell) you get a file with a single linefeed character NOT a
  20. zero length file. Csh's built in echo doesn't output anything if there
  21. are no arguments, /bin/echo does.
  22. -- 
  23. Andy Newman (andy@research.canon.oz.au)        "int - God's own type"
  24.