[Top][All Lists]

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

Possible bug in Gawk 3.1.3-7 under Fedora Core 2

From: Richard Nolde
Subject: Possible bug in Gawk 3.1.3-7 under Fedora Core 2
Date: Fri, 09 Jul 2004 08:55:47 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510

Gawk Maintainers,
   I recently upgraded from Redhat 9 to Fedora Core 2 Linux and I
discovered that the following shell script which calls gawk will
no longer work.  The version of awk that breaks is gawk 3.1.3-7
and I have rebuilt it from the source RPM with no changes.  If
I substitute the version of awk (GNU Awk 3.1.1 Copyright (C) 1989,
1991-2002 Free Software Foundation.) that I have on my older RH9
Linux installation, it works as expected.  I have indicated the
lines which fail at #### >>>>>      <<<<<<<< #### in the snipnet
below. The problems seems to be limited to the invocation of
external commands that send their output to standard output to
be captured by getline.  Is this a return of the behavior which
is described in the README.linux file?

ls -l /dev/stdin
lrwxrwxrwx  1 root root 17 Jul  7 09:52 /dev/stdin -> ../proc/self/fd/0

ls -l /dev/stdout
lrwxrwxrwx  1 root root 17 Jul  7 09:52 /dev/stdout -> ../proc/self/fd/1

uname -a
Linux zzz.xx.yy.com 2.6.6-1.435.2.3 #1 Thu Jul 1 08:25:29 EDT 2004 i686 i686 i386 GNU/Linux

Error Messages:
Building consolidated files in /tmp/data
sh: line 1: /cdrom/15/00600632.001: cannot execute binary file
sh: line 1: .001: command not found
Copying fileset /.* to /tmp/data/.tiff
/.: Cannot read TIFF header.
sh: line 1: /cdrom/15/00600633.001: cannot execute binary file

# Bash Shell Script Extract
for DIR in `find ${SOURCE} -type d -print`
    echo "Building consolidated files in ${DATADIR}"
    find ${DIR} -maxdepth 1 -type f -name "*.001" -print |
    awk -v DESTDIR=$DATADIR ' \
        { "dirname  " $1 | getline DIRNAME
          "basename " $1 " .001" | getline BASENAME
#### >>>>> The two previous lines appear to fail <<<<< #####
           WILDCARD = sprintf("%s/%s.*", DIRNAME, BASENAME)
           TIFFNAME = sprintf("%s/%s.tiff", DESTDIR, BASENAME)
           printf ("Copying fileset %s to %s\n", WILDCARD, TIFFNAME)
           system ("tiffcp -c g4 " WILDCARD " " TIFFNAME)
           close ("dirname" $1)
           close ("basename " $1 " .001")
           close ("tiffcp -c g4 " WILDCARD " " TIFFNAME)

I'm a BIG fan of gawk and still use it inspite of the world's craze
to deploy the latest and snazziest scripting language du jour to
do everything. Sorting of dynamic arrays by hand is a bit cumbersome
but I've gotten quite used to it, having written a quicksort in awk
that really rips through the data.

Let me know if I can provide additional information that will help.
I did the Fedora Core 2 install and pulled all available updates
immediately.  Googling for +gawk and +Fedora did not seem to find
any references to this problem.

  Richard Nolde
  Systems Programmer

reply via email to

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