echo \"text\" >> \'Users/Name/Desktop/TheAccount.txt\'
How do I make it so it creates the file if it doesn\'t exist, but overwrites it if it
Despite NylonSmile's answer, which is "sort of" correct.. I was unable to overwrite files, in this manner..
echo "i know about Pipes, girlfriend" > thatAnswer
zsh: file exists: thatAnswer
to solve my issues.. I had to use... >!
, á la..
[[ $FORCE_IT == 'YES' ]] && echo "$@" >! "$X" || echo "$@" > "$X"
Obviously, be careful with this...