Short answer: you cannot use functions from the C library directly in the shell.
Look at the different manual pages that you get with the following commands:
man 1 printf man 3 printf
The first is from section 1 (user commands), and the second is from section 3 (C library). Although they serve a similar purpose, they do not match. You can use printf , described in section 1, directly in the shell. Browse man 7 man for a list of different sections.
source share