How to zero out a file in tcsh?
John Chambers
jc at trillian.mit.edu
Thu Feb 6 23:18:16 EST 2003
Derek D. Martin writes:
| On Thu, Feb 06, 2003 at 09:27:33PM -0500, Ken Gosier wrote:
| > Question: I know that I can zero out a currently existing file in ksh and
| > bash by typing
|
| echo "\c" > filename
|
| You may need to use the -e option of echo to enable shell escape
| sequences. For example, bash requires this; i.e.:
|
| echo -e "\c" > filename
Not really. All that bash requires is:
>filename
You can use the echo command if you like to type. (And it does
come in handy when you want to put some text into the file. ;-)
Too bad that the csh clones don't permit an empty command. This
comes in handy in all sorts of situations.
More information about the Discuss
mailing list