Dear all,
I extract zip compressed data from an archive and pipe the output into
gawk for further processing. Is there a way to obtain the name of the
archive or of the compressed file?
If I am a bit unclear, I hope this small example illuminates my point:
unzip -p data1990.zip | gawk 'END { print FILENAME }'
results in
-
Although this was not surprising, I would prefer to either have data1990
(i.e. the name of the compressed file, probably difficult since there
could be many files in one archive) or the name of the archive
data1990.zip?
Is there a possibility to achieve this?
Hopefully, this is the right forum to ask this question.
Thank you very much in advance,
Roland
P.S. If it is necessary, I am using at this machine WinXP with unzip
5.50 and GNU Awk 3.1.4.


|