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