Avoid File From Truncated by I/O Redirection %E->  

set -C
 
 
Execute command 'set -C' enables the shell's noclobber option.
 
   
redirections with plain > to preexisting files fail.
 

'>|' overrides the noclobber option
 
   
a feature borrowed from the Korn shell
 
   
standardized since 1992,
 
   
some systems may not support it

Web Page Copyright: 亞洲大學資訊電機學院 連耀南 yaonanlien@asia.edu.tw  redirect3.htm,  Thu Sep 7 16:18:53 CST 2023