On 07/13/13 00:06, Jérémie Courrèges-Anglas wrote:
"Max Power" <[email protected]> writes:
You must have done something wrong:
I have not done anything.
Hey, you must have done *something*. Else you wouldn't be reporting
about it. You just don't want to tell us *exactly* what you've done.
The system is the default installation.
I'm not saying that you have fucked up your system.
You'd better put double quotes around your command substitutions rather
than simple quotes around fixed, non-special strings: "$(date '+%d')"
Ok, but why the command: mkdir $(date +'%d') after the digit 7 works fine?
If you showed us the actual commands you use, we wouldn't have to guess.
To further explain what Jan said in an earlier mail: somewhere in your
script the number output by date(1) is interpreted while in an
arithmetic context, where numbers starting with '0' are interpreted as
octal, and their leading zero gets trimmed. But this doesn't happen for
08 and 09 which aren't valid octal numbers.
~$ v=03; v=$(($v))
~$ echo $v
3
~$ v=08; v=$(($v))
ksh: 08: bad number `08'
~$ echo $v
08
~$
My *guess*:
typeset -i
/Alexander
Hence the reference to August, where scripts that have worked fine so
far start failing with weird error messages.
If I insert the date manually then it works fine - example: # date
201307071111
Now I can say that you're trying to fuck up your system. :)
but no by default. Why? thanks