printf - Reordering Arguments using $
February 28, 2021
I was recently watching a video by Live Overflow helping a person troubleshoot a format string exploit through Twitter, and saw something I was very curious about. In the video, the Yotuber poses a
question to the person if they could describe how %2$s
prints a string. I have never seen this syntax before. What does the dollar sign ($
) serve in the format string? This got me curious so I went
searching on the internet and the man pages to find out.