Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!wa3wbu!gdx!jay From: jay@gdx.UUCP (Jay A. Snyder) Newsgroups: comp.unix.xenix.sco Subject: Re: emptying a file and keeping its ownership Message-ID: <97@gdx.UUCP> Date: 5 Jan 91 04:26:58 GMT References: <1990Dec30.220722.29050@jarvis.csri.toronto.edu> <1990Dec31.214030.7816@athena.mit.edu> <1991Jan1.040621.27634@NCoast.ORG> <199 Distribution: na Organization: GDX-BBS, Mechanicsburg, PA Lines: 15 In-reply-to: jpr@jpradley.jpr.com's message of 1 Jan 91 17:30:14 GMT > >I find that in my csh, the following works: > % : > file >That initial colon does the trick. What mechanism is operating here? > The ':' is a comment character for old versions of sh (dating from V7), in fact V7 bourne shell doesn't accept '#' for comments. Most modern verions of sh do recongnize the ':'. If you are running Xenix, the ':' is also used to tell a non bourne shell that a script is intended for bourne shell (equiv to a BSD file with #!/bin/sh as the first line). J