Hi,
I've written a small perl proggy to split up ascii spoolfiles into separate
ascii files for archiving.
e.g. a spoolfile containing say 20 order acknowledgements will be split up
into 20 separate ascii files, and then converted to pdfs, with a simple html
list linking to them.
My next problem is that to get the list of spoolfile names, i was using grep,
since there are lots of files with the same extension...
grep ACKNOWLEDGMENT spool*sdy | awk 'BEGIN {FS=":"}{print $1}' > filelist
To have this run from within my perl script, do I just use system("grep ..);
or is there a more clever 'perl way' to do this ?
I thought of opening every sdy file and checking for the word ACKNOWLEDGMENT
in the specific line number where it would appear, but I think this would be
overkill - mabye not, as I guess grep would open every file anyway ?
any suggestions ?
OT, but am running it on a woody box !
Thanks,
Declan
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!