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 !