how to read text file in zip file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to read text file in zip file
# 1  
Old 11-21-2005
how to read text file in zip file

If any body knows how to read text file inside zip file,Plz help to complete my task.

Thanks lot.
# 2  
Old 11-21-2005
If your zip file has been zipped using compress or gzip, you can use zcat or gzcat.
Code:
zcat file.txt.Z|more

OR
Code:
gzcat file.txt.gz | more

# 3  
Old 11-21-2005
how to read text file in zip file

Hi,

My zip File name is: abc.zip
My Text file name is :test.txt

path in zip file :av/bd/9005

Plz need this way

Thanks lot.
# 4  
Old 11-21-2005
unzip -p foo.zip
# 5  
Old 11-22-2005
Quote:
Originally Posted by ppierald
unzip -p foo.zip


It was PKZIP format.

My zip file name: abc.zip
My txt file name containes in abc.zip is : test.txt
path containing in abc.zip file is: ad/bv/90876

how to unzip and store file in variable in shell script.

Thanks Lot.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Read csv file, convert the data and make one text file in UNIX shell scripting

I have input data looks like this which is a part of a csv file 7,1265,76548,"0102:04" 8,1266,76545,"0112:04" I need to make the output data should look like this and the output data will be part of text file: 7|1265000 |7654899 |A| 8|12660000 |76545999 |B| The logic behind the... (6 Replies)
Discussion started by: RJG
6 Replies

2. UNIX for Dummies Questions & Answers

How to read data from zip file?

Hi All, could you please answer the below question. 1)How to read the data from zip file without unzip? Regards Priyanka (2 Replies)
Discussion started by: pspriyanka
2 Replies

3. UNIX for Dummies Questions & Answers

How to read the data from zip file without unzip?

Hi All, could you please answer the below question. 1)How to read the data from zip file without unzip? this is interview question Regards Priyanka (1 Reply)
Discussion started by: pspriyanka
1 Replies

4. Shell Programming and Scripting

Read in search strings from text file, search for string in second text file and output to CSV

Hi guys, I have a text file named file1.txt that is formatted like this: 001 , ID , 20000 002 , Name , Brandon 003 , Phone_Number , 616-234-1999 004 , SSNumber , 234-23-234 005 , Model , Toyota 007 , Engine ,V8 008 , GPS , OFF and I have file2.txt formatted like this: ... (2 Replies)
Discussion started by: An0mander
2 Replies

5. Shell Programming and Scripting

Loop through the dir and Rename zip files and their underlying text file.

I have files in the ABC_YYYYMMDD.zip format under a directory. Each zip file contains A text file in the ABC_YYYYMMDD.txt format. I am trying to create a script that will Rename the zip files and their underlying text file replacing the datepart in them with . For eg: in the case of... (1 Reply)
Discussion started by: bash987
1 Replies

6. Shell Programming and Scripting

Finding a text file from a group of zip files without unzipping

HI , There are more than 100 zip files in a directory and i wanted to see if there is a max1157.txt file in any of the zip files without actually unzipping them. Could you please help. Thanks in Advance. Karthik. (6 Replies)
Discussion started by: karthikk0508
6 Replies

7. Shell Programming and Scripting

Help in searching a multiple text in zip file

Hi Gurus, i have 8 zipped files and each file is having more than 100,000 records or more. issue :- i want to search the missing text from each zipped files i have stuck here, the below command works fine if i give the value 10 for the deptno. if i have more than 1 records... (6 Replies)
Discussion started by: SeenuGuddu
6 Replies

8. Shell Programming and Scripting

how read specific line in a file and write it in a new text file?

I have list of files in a directory 'dir'. Each file is of type HTML. I need to read each file and get the string which starts with 'http' and write them in a new text file. How can i do this shell scripting? file1.html <head> <url>http://www.google.com</url> </head> file2.html <head>... (6 Replies)
Discussion started by: vel4ever
6 Replies

9. Shell Programming and Scripting

Read specific file from a zip archive without extracting

Hi All, I would like to extract specific file from a zip archive. I have a zip archive "sample.zip". sample.zip contains few text files and images... text1.txt, text2.txt, pic.jpg etc... I need to read specific file "text2.txt" from "sample.zip" WITHOUT EXTRACTING the zip file. ... (4 Replies)
Discussion started by: sridharg
4 Replies

10. UNIX for Advanced & Expert Users

How can i read a non text file in unix - ELF-64 executable object file - IA64

The binary file is ELF-64 executable object file - IA64. How i know that the source is Is there any comamnd in unix i can read these kind of files or use a thirty party software? Thanks for your help (8 Replies)
Discussion started by: alexcol
8 Replies
Login or Register to Ask a Question