On 05/28/2014 09:58 AM, Elias Persson wrote:
On 2014-05-28 15:40, Robert Nichols wrote:
On 05/28/2014 07:10 AM, Elias Persson wrote:
On 2014-05-25 12:08, Paolo De Michele wrote:> !/bin/bash > tar cfz `date +%F`_$NAME.tar.gz web$NR/
- Your `tar` stanza is wrong (if it's not obvious to you why that is, now is a good time to make a habit of using long options (e.g. `--gzip`) whenever possible).
Actually it is correct, aside from possible whitespace issues with $NAME. It is using an outdated syntax (short options all in a group _without_ a leading "-"), but doing it correctly with the needed option argument following the set of option letters.
I stand corrected. Apparently having the "f" in the middle is not a problem with the old syntax.
It's analogous to printf(), where a string with all the format controls comes first, followed by all of the needed arguments in the needed sequence. It causes all sorts of weirdness when you get things wrong, as when unquoted whitespace causes what should have been one argument to appear as two or more.