emptying a file and keeping its ownership
Jean-Pierre Radley
jpr at jpradley.jpr.com
Sun Jan 6 05:19:58 AEST 1991
In article <97 at gdx.UUCP> jay at 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 at jpr.com CIS: 72160,1341
More information about the Comp.unix.xenix.sco
mailing list