Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: bash command incompatibility



Petre Bandac wrote:
> [petre@xxl]$ cat /dev/null > fetchmail.log
>      ~
> zsh: file exists: fetchmail.log
> [petre@xxl]$
>
>
> when using bash, this was the command to empty the log files. why
> doesn't it work in zsh ?

Somewhere in one of the startup scripts someone has put `setopt
noclobber'.  You need to turn it off:

unsetopt noclobber

Putting this in ~/.zshrc should be late enough to cancel it if it's in
one of the system startup scripts.

The option actually exists in bash, too, but clearly wasn't turned on.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author