I accidentaly wrote:
printf "here: %s $d\n" "${line:0:32}" "${#line}"
and got:
here: /home/gsamaras/Bash/libs/goodLib
here: 103
Why?
Of course I meant to say %d
, but I don't understand this behavior in the mistake I made. I would probably expect it to print "here: /home/gsamaras/Bash/libs/goodLib $d", like it would do in C... I couldn't find a duplicate or something on that, thus the question.