YAAB (Yet another awk bug)

Bill Vaughn bill at ur-cvsvax.UUCP
Tue Sep 10 03:17:47 AEST 1985


DESCRIPTION:
Awk's version of 'printf' core dumps or prints garbage when a field width
variable is used. The manual page refers to printf(3S) so I assume this
feature of printf should be implemented.

REPEAT BY:
Examine the following script. Try it yourself.

Script started on Mon Sep  9 12:58:06 1985
% cat test.c
main(){printf("%*s\n",5,"a");}
% cc test.c ; a.out
    a
% echo 5 |awk '{printf("%*s\n",$1,"a")}'
                                                                            l$l3lll)l:lHlSl]lhl(m%n
% echo 5 |awk '{printf("%*s\n",5,"a")}'
Segmentation fault (core dumped)
% ^D
script done on Mon Sep  9 13:01:08 1985

FIX:
I don't have one.  Can anyone out there help?
I haven't been able to kludge around this problem as yet.

_________________________________
\          Bill Vaughn          /
 \  Center for Visual Science  /
  |  University of Rochester  |
 /     Rochester, NY 14627     \
/seismo!rochester!ur-cvsvax!bill\
---------------------------------



More information about the Net.bugs mailing list