You're just missing a comma after the format string, e.g.

awk -F'[:_\t]' '{ printf "%s\t%4.0f\t%4.0f\t%s\n", "chr"2-1, 1":"$2"_"$3"_"$4 }' file
#                                                ^
#                                                |
#                                                this one
Answer from Freddy on Stack Exchange
🌐
University of Utah
math.utah.edu › docs › info › gawk_7.html
AWK Language Programming - Printing Output
Instead of supplying explicit width and/or prec values in the format string, you pass them in the argument list. For example: w = 5 p = 3 s = "abcdefg" printf "%*.*s\n", w, p, s ... Both programs output `**abc'. Earlier versions of awk did not support this capability.
🌐
GNU
gnu.org › software › gawk › manual › html_node › Printf-Examples.html
Printf Examples (The GNU Awk User’s Guide)
awk 'BEGIN { printf "%-10s %s\n", "Name", "Number" printf "%-10s %s\n", "----", "------" } { printf "%-10s %s\n", $1, $2 }' mail-list
🌐
TutorialsPoint
tutorialspoint.com › awk › awk_pretty_printing.htm
AWK - Pretty Printing
For %g and %G, trailing zeros are not removed from the result. The following example describes this − ... [jerry]$ awk 'BEGIN { printf "Octal representation = %#o\nHexadecimal representaion = %#X\n", 10, 10 }'
🌐
GNU Project
gnu.ist.utl.pt › software › gawk › manual › html_node › Printf-Examples.html
Printf Examples - The GNU Awk User's Guide
The following is a simple example of how to use printf to make an aligned table: awk '{ printf "%-10s %s\n", $1, $2 }' BBS-list · This command prints the names of the bulletin boards ($1) in the file BBS-list as a string of 10 characters that are left-justified.
🌐
LBL
bl831.als.lbl.gov › ~gmeigs › scripting_help › printf_awk_notes.txt
Examples of printf Formatting
echo 123.4567 55.2 | awk '{printf "%.3f ", $1; print $2}' 123.457 55.2
🌐
GNU
gnu.org › software › gawk › manual › html_node › Print-Examples.html
Print Examples (The GNU Awk User’s Guide)
NOTE: You can continue either a print or printf statement simply by putting a newline after any comma (see awk Statements Versus Lines).
🌐
CodeSignal
codesignal.com › learn › courses › text-processing-with-bash › lessons › text-processing-with-awk
Text Processing with awk | CodeSignal Learn
The syntax for printf is: ... The ... width of the field. Positive Width: Right-justified by default. For example, s formats a string, right-aligned, with a minimum width of 10 characters....
Find elsewhere
🌐
MIT
web.mit.edu › gnu › doc › html › gawk_6.html
The GAWK Manual - Printing Output
For example: w = 5 p = 3 s = "abcdefg" printf "<%*.*s>\n", w, p, s ... Both programs output `<**abc>'. (We have used the bullet symbol "*" to represent a space, to clearly show you that there are two spaces in the output.) Earlier versions of awk did not support this capability.
🌐
Linux Hint
linuxhint.com › 20_awk_examples
20 awk examples – Linux Hint
The following example shows the use of awk command with sed command. Here, sed command will search all employee names starts with ‘J’ and passes to awk command as input. awk will print employee name and ID after formatting. $ cat employee.txt $ sed -n '/J/p' employee.txt | awk -F '\t' '{ printf "%s(%s)\n", $2, $1 }'
🌐
Wikibooks
en.wikibooks.org › wiki › An_Awk_Primer › Output_with_print_and_printf
An Awk Primer/Output with print and printf - Wikibooks, open books for an open world
BEGIN { x = 35; printf("x = %d decimal, %x hex, %o octal.\n", x, x, x) } ... The format codes in this example include: "%d" (specifying decimal output), "%x" (specifying hexadecimal output), and "%o" (specifying octal output).
🌐
Blogger
linuxnixscripting.blogspot.com › 2013 › 02 › awk-scripting-8-awk-printf-statements.html
AWK scripting: 8 AWK printf statements examples ~ Coding Mania
Example 8: Make the column element with 4 digits and 7 in length and print the number to right hand side. awk '{printf "|%7.4d|%7.4d|%7.4d|\n", $2,$3,$4}' db.txt
🌐
Getdocs
getdocs.org › Gawk › docs › latest › Printf-Examples
Printf Examples (The GNU Awk User’s Guide) - Get docs
awk 'BEGIN { print "Name Number" print "---- ------" } { printf "%-10s %s\n", $1, $2 }' mail-list · The preceding example mixes print and printf statements in the same program. Using just printf statements can produce the same results: awk 'BEGIN { printf "%-10s %s\n", "Name", "Number" printf ...
🌐
Earthly
earthly.dev › blog › awk-examples
Understanding AWK - Earthly Blog
July 19, 2023 - So my print $15 "\t" $13 "\t" $8 becomes printf "%s \t %s \t %s", $15, $13, $8. From there I can add right padding and fix my layout by changing %s to %-Ns where N is my desired column width: $ awk -F '\t' \ '$4 == "0439023483" { printf "%s ...
🌐
GNU
ftp.gnu.org › old-gnu › Manuals › gawk-3.1.1 › html_node › Printf-Examples.html
Examples Using printf
awk 'BEGIN { print "Name Number" print "---- ------" } { printf "%-10s %s\n", $1, $2 }' BBS-list · The above example mixed print and printf statements in the same program.
🌐
GNU
gnu.org › software › gawk › manual › gawk.html
The GNU Awk User’s Guide
Printing Output, describes how awk programs can produce output with print and printf.