![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reading files in directory | Dastard | Shell Programming and Scripting | 3 | 09-04-2007 03:02 AM |
| Reading Files | oop | UNIX for Dummies Questions & Answers | 3 | 07-31-2007 07:40 AM |
| reading .bin files | eastcoast_uix | UNIX for Dummies Questions & Answers | 1 | 06-26-2007 01:43 PM |
| Reading *.chm files? | riwa | UNIX for Dummies Questions & Answers | 3 | 04-02-2006 09:30 PM |
| Reading files on different platforms | BigTool4u2 | Linux | 2 | 04-18-2004 05:47 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
reading gz files
Hi,
I have a simple perl script where I am passing array of gziped files to the while loop and trying to read content of each field one line at the time using gzcat. Yet, I can not get it to work Here is what I am doing ... while ($filename=shift) { open(MYFILE, "| gzcat $filename"); while ($next=<MYFILE>) { print $next; } } ... my problem is the print $next; never executes. Somehow inner loop condition returns false even though gz file exist and it is not empty. I am relatively new to perl and perhaps I am doing something wrong. Any ideas? |
|
||||
|
Quote:
#!/usr/bin/ksh while [ -f ${1} ] do gzcat ${1} shift done |
![]() |
| Bookmarks |
| Tags |
| perl, perl shift, shift, shift perl |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|