\u
is a special code in printf
; your code contains \username
which is causing the error you are getting. I suspect you just have a typo there; if not, represent a backslash in printf
with \\
.
Per @Jim Balter’s comment, you probably used \
where you meant /
.