Thursday, May 21, 2009

Override noclobber


set -o noclobber
echo "test" > test.txt
echo "test" > test.txt 
# bash: test.txt: cannot overwrite existing file

echo "test" >| test.txt

No comments:

Post a Comment