.csv.gz file extract errors using Winzip


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users .csv.gz file extract errors using Winzip
# 1  
Old 11-17-2017
.csv.gz file extract errors using Winzip

HI All,

Currently, i am working on bash shell.

I have generated the csv file via shell script and because of high size , i have zip the csv file and send it to the outlook in windows.

filename : viswa.csv.gz

i can able to receive the mail successfully , But i am not able to view the data correctly . i am getting the below errros when unzip the files using winzip

Code:
Use Path: yes   Overlay Files: yes
Extracting US_trade_data.csv
Irrecoverable Error: Invalid compressed data stream (cannot decompress).


i can see the file content in windows as below and i can see the data correctly in unix server

Code:
SH
 ɡ[–-&59“: ™JI+E#’ }zO__>|Ÿ‡޽+V>?NŸ~pz
 w>|}?Oy›~?_~}H֏??>ÏŸwˆ__>8p%W~…o?[ŸŸ>z{ŸfŒ`›5|c$y'˜bgǐ–_OXM.‡ݷw?˜)*ǿŸ3l۸„;NO?c-aUL(eY““œovf<yïIl"€V*>hi6EzRY['e61T-rqvfSz3›q]oŸ}	IŸ#zWx~@aL-$'ء;š~*T!HCy|#~%Œ[—V‡‡P›‡'Z@*–#Џp*⥁B_}K;‘*Kɣf}%߁_O%KOw?{Ÿ™QŸ>?~__?P*p#ƒ*TIƥ5vnshl‘g‚•o}e?|‡1*Œ -7‰*<<}=^?w™`#d‚g[ž5>3k|Rh|‡J‹ICaSwd.
 ‰‹Z9Œqy$$KYW!REï/'M6t
ƒn=9Cg€B@‡r:|zSgϸ[M<jžf۴*Z~Zȥ_G?zŸ?Z쾫p‚v™-žvxI?~‡CQ–g2MY…`JT›s*$47jžŒ˜#^O~!DxOq›Oe‰ZmŸˆ}$S<ݍO”{•ӽvtUˆaA*2PSŽ<;eŸpJۦ!u_€\<Ÿ=r`…g4GU(B–
 Œ0QSˆU–Q”v

Kindly help me on this. i want to view the content without any issues in Windows machine.

Thanks in advance

Last edited by Scott; 11-17-2017 at 09:47 AM.. Reason: Added code tags
# 2  
Old 11-17-2017
As you zipped a single file, it is possible that WinZip is unable to cope with the format. It is highly likely that if your originating system is Linux you have the zip program which is compatible with WinZip. Try:
Code:
zip US_trade_data.zip US_trade_data.csv

Andrew
# 3  
Old 11-17-2017
gz is not zip, just a distant relative of it. If you want a zip file, compress it with zip as apmcd47 suggests.

Or you could use the free 7-zip application on Windows, which should know what to do with gz files.

It's also possible the file got corrupted during transfer. Did you FTP it over? Be sure to set binary mode on your FTP client before downloading.
# 4  
Old 11-20-2017
Thanks Corona688 and apmdc47.

Zip command is not installed in my server. Its there any alternative way.

gzip & gunzip is installed .

Its there any possibilities of using gzip & gunzip command.


Thanks
# 5  
Old 11-20-2017
If you want to make gz files? Sure. I recommend the 7zip program to extract them in Windows.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to extract start/end times from log file to CSV file?

Hi, I have a log file (log.txt) that which contains lines of date/time. I need to create a script to extract a CSV file (out.csv) that gets all the sequential times (with only 1 minute difference) together by stating the start time and end time of this period. Sample log file (log.txt) ... (7 Replies)
Discussion started by: Mr.Zizo
7 Replies

2. Shell Programming and Scripting

Trying extract from text file and convert csv

I want to extract IP address, system ID and engine IDs of this file ( marked in red) and put in a csv. E.g. 1.1.1.1, SYSTEMID, 000012345678981123548912 I get these file by running an expect script from solaris. Here is the text file output of my expect script. working on 1.1.1.1 SNMP... (5 Replies)
Discussion started by: pbshillong
5 Replies

3. Shell Programming and Scripting

Extract data from XML file and write in CSV file

Hi friend i have input as following XML file <?xml version="1.0"?> <Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.054.001.02"> <BkToCstmrDbtCdtNtfctn> <GrpHdr><MsgId>LBP-RDJ-TE000000-130042430010001001</MsgId><CreDtTm>2013-01-04T03:21:30</CreDtTm></GrpHdr>... (3 Replies)
Discussion started by: mohan sharma
3 Replies

4. Shell Programming and Scripting

extract data in a csv file based on a certain field.

I have a csv file that I need to extract some data from depending on another field after reading info from another text file. The text file would say have 592560 in it. The csv file may have some data like so Field 1 Field2 Field3 Field4 Field5 Field6 20009756 1 ... (9 Replies)
Discussion started by: GroveTuckey
9 Replies

5. Shell Programming and Scripting

Extract last cell of csv file

How do I extract the last cell in a column of a csv file using linux shell scripting? Or alternatively, how do I get the number of cells of a csv file? (2 Replies)
Discussion started by: locoroco
2 Replies

6. UNIX for Dummies Questions & Answers

How to extract one column from csv file in perl?

Hi everyone, i am new to perl programming, i have a problem in extracting single column from csv file. the column is the 20th column, please help me.. at present i use this code #!C:/perl/bin use warnings; use strict; my $file1 = $ARGV; open FILE1, "<$file1" or die "Can't... (13 Replies)
Discussion started by: kvth
13 Replies

7. Shell Programming and Scripting

How to extract data from csv file

Hello everybody, Here is my problem, I don't know anything about shell programming and my boss is actually asking me to develop a shell script in order to get values in a csv file from a specific date. Here is a sample of the csv file : Date;Enchanement;Titre;Libell ;calendrier;Heure dbut;Heure... (11 Replies)
Discussion started by: freyr
11 Replies

8. Shell Programming and Scripting

extract pattern from csv file

hi, i have a situation where i have a csv file in the format date,name eg: 1284631889869,a 1284631889879,b 1284631889459,c . . . . . . . now i take a time and an interval from user. (5 Replies)
Discussion started by: niteesh_!7
5 Replies

9. Shell Programming and Scripting

Extract data from an XML file & write into a CSV file

Hi All, I am having an XML tag like: <detail sim_ser_no_1="898407109001000090" imsi_1="452070001000090"> <security>ADM1=????</security> <security>PIN1=????</security> <security>PIN2=????</security> ... (2 Replies)
Discussion started by: ss_ss
2 Replies

10. Shell Programming and Scripting

extract .csv file

Hi all I am new to unix . I need to write a script that extracts some data from oracle into a .csv file with heading of the columns in the file SO i created the following two scripts but they are not working ac.sql (this is the sql file that i will call inside the shell script when i run... (1 Reply)
Discussion started by: rajesh_tns
1 Replies
Login or Register to Ask a Question