Recently I'm echoing short sentences to a tree_hole file.
I was using echo 'something' >> tree_hole to do this job.
But I was always worried of what if I mis-input of > instead of >>, since I did this often.
So I made a global bash func of my own in the bashrc:
function th { echo "$1" >> /Users/zen1/zen/pythonstudy/tree_hole; }
export -f th
But I'm wondering if there is another simple way to append lines to the end of a file. Because I may need to use that often in other occasions.
Is there any?
rm="rm -i"and in an other environment wroterm *waiting for the confirmation questions. You are learning dangerous habits ! – Walter A Jan 12 '15 at 12:37mv -ifor safety, but I've trained myself to type the option, not alias it. – Celada Jan 12 '15 at 14:58>|when I want to write something to a file, and still I'll use>>to append something to files. The chance to mis-operate won't improve. – Zen Jan 13 '15 at 02:48