-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid printf format in iolatency/cachestat #30
Comments
You don't have, for example, /bin/bash linked to /bin/zsh (which has a printf built-in that doesn't know about %()T expressions), do you? The "invalid format character" message is exactly what zsh displays (and different than, say, the dash built-in which is "invalid conversion specification"). Otherwise I'd guess your /usr/bin/printf, for whatever reason, doesn't support those expressions, perhaps it's too old? |
I have zsh as root shell, but it is not linked to /bin/bash. /usr/bin/printf is from coreutils-8.27.0.23.f4570 |
Ah, so the "%()T" expression requires using a bash built-in, not /usr/bin/printf (which only supports whatever the C printf() function does). So - I'm going to guess either your bash doesn't support this expression (looks like this has been in bash since 4.2 - circa 2011) or somehow another printf implementation is being used here (zsh shows the same error message you have, /usr/bin/printf does not). Does your "bash" manpage show a section about %(datefmt)T ? Does printf "%(%H)T\n" (run from bash) display the current hour? |
You are right:
but:
seems like I need to migrate /bin/bash from 3.2 to 4.2+ Thanks for support! |
Excellent! Glad that's is solved for you and thanks for following up. |
The text was updated successfully, but these errors were encountered: