I have Ubuntu 17.10 on two boxes.  I ran this command on both of them...

echo 123456789 | awk '{printf("%'"'"'d\n", $1)}'

...and the awk command worked on one box but not on the other.

The path to awk, and to other *awk commands, is /usr/bin, but after that 
it gets complicated.  On the machine where it worked, I had installed 
gawk.  I used to think that a GNU/Linux installation would come with GNU 
awk by default, but it doesn't.  It comes with mawk instead.  This is the 
system of symlinks:

/usr/bin/awk -> /etc/alternatives/awk
/etc/alternatives/awk -> /usr/bin/mawk
/usr/bin/mawk

/usr/bin/nawk -> /etc/alternatives/nawk
/etc/alternatives/nawk -> /usr/bin/mawk
/usr/bin/mawk

So with the default Ubuntu, you have awk, mawk and nawk, but awk and nawk 
are symlinks to mawk.  So you really have only mawk.  Why?  I have no 
idea.  So next I install gawk and that changes things a bit.  It adds the 
gawk binary in /usr/bin, but it also changes the symlinks:

/usr/bin/awk -> /etc/alternatives/awk
/etc/alternatives/awk -> /usr/bin/gawk
/usr/bin/gawk

/usr/bin/nawk -> /etc/alternatives/nawk
/etc/alternatives/nawk -> /usr/bin/gawk
/usr/bin/gawk

/usr/bin/igawk
/usr/bin/mawk

So now I have awk, gawk, igawk, mawk and nawk, but while awk and nawk used 
to link to mawk, now they link to gawk, so I really only have gawk, igawk 
and mawk.

I guess it is explained here, but the thing that's missing is why 
GNU/Linux doesn't come with GNU awk, forcing users to add it later...

https://askubuntu.com/questions/561621/choosing-awk-version-on-ubuntu-14-04


About the error:

When the awk command above worked (i.e., with gawk), I got this output...

123,456,789

...and when it didn't work (i.e., with mawk), I got this error:

awk: run time error: improper conversion(number 1) in printf("%'d
")
 	FILENAME="-" FNR=1 NR=1

Best,
Mike