Count records in a zip file


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Count records in a zip file
# 1  
Old 09-23-2008
Count records in a zip file

Hello,

I searched the forums on the keywords in the title I used above, but I did not find the answer:

Is it possible to count records in a .zip file on an AIX machine if i don't have pkunzip installed?

From all the research I'm reading in google and the reading of pkunzip in Unix.com, I'm assuming that if I can't unzip it, I can't count it... ?

(It's a big company, so no, I can't install any freeware to help me...)

Thanks,
# 2  
Old 09-23-2008
Are the zip files created on AIX? If there are no tools/libraries to zip/unzip on AIX, why are the files of interest? They cannot be used there. If they are part of production requirement the tools have to live somewhere on another server. MAybe a PC.

Can you NFS mount a PC share? You can extract those files there on the PC, then read them back on AIX.

You can install cygwin (free) on your local PC, if you have one. cygwin allows you to install any freeware you want. And run it against PC files.
# 3  
Old 09-24-2008
Thanks for your response -

The files are created by another company as a .txt file, zipped through winzip and ftp'd to us. I'm a mediator who just takes the files and ftp's them to the vendor who wants to actually use the file. All other companies (who send us source files) and vendors (who receive the files) have unix servers and this is the only company that doesn't even know what Unix is.

Since this is a large company with tight controls, I would not be allowed to NFS mount a PC share (wouldn't that be wonderful? Smilie)

The interest in these files is simply that I usually do a record count and put that along with the file size in notification emails to the vendors which at least helps to serve as some kind of flag when something might go wrong. But because this one company is a Windows shop that only sends files with a .zip extension, and I can't create a connection between the AIX server and my PC, it sounds like I will not be able to do a record count on the file... ?
# 4  
Old 09-24-2008
That is correct. Unless you have zgrep, zcat, or unzip, you are out of luck.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How can we Zip multiple files created on the same date into one single zip file.?

Hi all i am very new to shell scripting and need some help from you to learn 1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder. 2)Post zipping... (1 Reply)
Discussion started by: b.saipriyanka
1 Replies

2. UNIX for Beginners Questions & Answers

How can we Zip multiple files created on the same date into one single zip file.?

Hi all i am very new to shell scripting and need some help from you to learn 1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder. 2)Post zipping... (2 Replies)
Discussion started by: b.saipriyanka
2 Replies

3. Shell Programming and Scripting

Shell script to filter records in a zip file that contains matching columns from another file

Not sure if this is the correct forum for this question. I have two files. file1.zip, file2 Input: file1.zip col1, col2 , col3 a , b , 0:0:0:0:0:c436:9346:d40b x, y, 0:0:0:0:0:880:39f9:c9a7 m, n , 0:0:0:0:0:80c7:9161:fe00 file2.txt col1 c4:36:93:46:d4:0b... (1 Reply)
Discussion started by: anil.v
1 Replies

4. Shell Programming and Scripting

How to count dup records in file?

Hi Gurus, I need to count the duplicate records in file file abc abc def ghi ghi jkl I want to get below result: abc ,2 abc, 2 def ,1 ghi ,2 ghi, 2 jkl ,1 or abc ,2 def ,1 (3 Replies)
Discussion started by: ken6503
3 Replies

5. Shell Programming and Scripting

How to compare data from 2 zip files and capture the new records from file2 to a new file

I have 2 zip files which have about 20 million records in each file. file 2 will have additional records than file 1. I want to compare the records in both the files and capture the new records from file 2 into another file file3. Please help me with a command/script which provides me the desired... (8 Replies)
Discussion started by: koneru
8 Replies

6. UNIX for Dummies Questions & Answers

Script to get Row Count of ZIP Files

Hi, I have some data files in a zipped format.(eg: aa.gz).I would like to know the number or rows in each zip file(May be populate the file name and line numbers into a text file).I know the commands wc -l and gunzip,.But how I will create a shell script for this to extract each files and get... (5 Replies)
Discussion started by: abhilash_menon
5 Replies

7. UNIX for Dummies Questions & Answers

unzip .zip file and list the files included in the .zip archive

Hello, I am trying to return the name of the resulting file from a .zip archive file using unix unzip command. unzip c07212007.cef7081.zip Archive: c07212007.cef7081.zip SecureZIP for z/OS by PKWARE inflating: CEP/CEM7080/PPVBILL/PASS/G0063V00 I used the following command to unzip in... (5 Replies)
Discussion started by: oracledev
5 Replies

8. Shell Programming and Scripting

grep all records in a file and get a word count -perl

Hi, I have a file .. file.txt .. i need to get a total record count in the files into a $variable.. im using perl script thanks (4 Replies)
Discussion started by: meghana
4 Replies

9. Shell Programming and Scripting

To find the count of records from tables present inside a file.

hi gurus, I am having a file containing a list of tables.i want to find the count of records inside thes tables. for this i have to connect into database and i have to put the count for all the tables inside another file i used the following loop once all the tablenames are inside the file. ... (1 Reply)
Discussion started by: navojit dutta
1 Replies

10. Shell Programming and Scripting

Count No of Records in File without counting Header and Trailer Records

I have a flat file and need to count no of records in the file less the header and the trailer record. I would appreciate any and all asistance Thanks Hadi Lalani (2 Replies)
Discussion started by: guiguy
2 Replies
Login or Register to Ask a Question