4 ms·
This will work fine until the day when you mistype >> into >, and all your notes are gone.
by ConfucianNardin 9y ago
This 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 >.