4 ms·
I try to use the long-form of command-line switches in scripts, e.g. `cp --force` instead of `cp -f`.
by rrwo 4y ago
I try to use the long-form of command-line switches in scripts, e.g. `cp --force` instead of `cp -f`.
- jwilk 4y agoIt's #13 in the article.
- rrwo 4y ago(I missed that one, thanks)
- ndsipa_pomu 4y agoDon't forget to put in a '--' to end option parsing too: 'cp --force --' This works around malicious filenames that may start with a '-'. Especially important if you're running an 'rm' command Edit: another workaround is to ensure that files are always absolute pathnames or even starting with './' for relative ones.