4 ms·
Do you really need a function for that? cat >> ~/notes does the same thing.
by lottin 9y ago
Do you really need a function for that?
cat >> ~/notes
does the same thing.
- tyingq 9y agorlwrap cat >> ~/notes Would give you some rudimentary readline editing capability.
- ConfucianNardin 9y agoThis will work fine until the day when you mistype >> into >, and all your notes are gone.
- wyldfire 9y agoThat seems like a real risk, true. But at least at $THE_OFFICE, I'm lucky that there's a trivial-to-recover ~/.snapshot/hourly.?/notes file. YMMV.
- rhizome 9y agoA `cat -i` switch could be good.
- ConfucianNardin 9y agoA flag for cat won't help you - it's your shell that does the redirection. You're looking for `set -o noclobber` (same as `set -C`).
- rhizome 9y agoAh, let's go with `> -i` then! :)
- hk__2 9y agoNot if you have `set -C` in your ~/.bashrc, which prevents you from overriding files with >.