Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!uupsi!jpradley!jpr From: jpr@jpradley.jpr.com (Jean-Pierre Radley) Newsgroups: comp.unix.xenix.sco Subject: Re: emptying a file and keeping its ownership Message-ID: <1991Jan05.181958.868@jpradley.jpr.com> Date: 5 Jan 91 18:19:58 GMT References: <1990Dec30.220722.29050@jarvis.csri.toronto.edu> <1990Dec31.214030.7816@athena.mit.edu> <1991Jan1.040621.27634@NCoast.ORG> <199 <97@gdx.UUCP> Reply-To: jpr@jpradley.UUCP (Jean-Pierre Radley) Distribution: na Organization: NYC Public Unix Lines: 22 In article <97@gdx.UUCP> jay@gdx.UUCP (Jay A. Snyder) writes: >> >>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). I knew that, thanks, but this is out of csh on either SCO Xenix or SCO Unix. And I'm typing that at the command line, not in a script. Are you saying that typing ':' at a csh prompt calls sh? I doubt it, because if I try ": command", I don't get "command" to run. Jean-Pierre Radley NYC Public Unix jpr@jpr.com CIS: 72160,1341