bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gawk] gawk printf misunderstand


From: PROG
Subject: [bug-gawk] gawk printf misunderstand
Date: Wed, 31 Oct 2012 16:44:17 +0600

Hello,
I have two different behavior in two neighbor versions,
please clarify, what is wrong and how to make common solution.

GNU Awk 3.1.5
Copyright (C) 1989, 1991-2005 Free Software Foundation.

echo "ff" | awk '{printf("% 4s\n", $1)}'
  ff

echo "ff" | awk '{printf("%04s\n", $1)}'
00ff

It works exactly as I expect.

In the same time:

GNU Awk 3.1.8
Copyright (C) 1989, 1991-2010 Free Software Foundation.

echo "ff" | awk '{printf("% 4s\n", $1)}'
  ff

echo "ff" | awk '{printf("%04s\n", $1)}'
  ff

WHY not 00ff?

-- 
Egor Shkerin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]