Unix Shell - unzip ASCII files

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > December 2006 > unzip ASCII files





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author unzip ASCII files
DataMonkey

2006-12-13, 1:19 pm

Thank you for taking time to read this post.

I have downloaded to my hard drive several zipped files that during the
zip procedure, text mode was specified using an IBM mainframe. The
result is an archive file with the following naming scheme: st.2001.ip
(State, year, file type i.e, inpatient).

Problem is when I attempt to inflate the files on unix (with "unzip
st.2001.ip") I get an error along the lines of "end of central
directory not found."

The command "file" tells me the type of file is "data" and not "Zip
Archive" as I would hope.

I was told the problem is that the files are ASCII and not binary as
they should be.

Is there anyway to unzip ASCII files in unix. If so, I'd appreciate the
code.

Many thanks

Bill Marcum

2006-12-13, 7:22 pm

On 13 Dec 2006 09:26:00 -0800, DataMonkey
<dan.awad@gmail.com> wrote:
> Thank you for taking time to read this post.
>
> I have downloaded to my hard drive several zipped files that during the
> zip procedure, text mode was specified using an IBM mainframe. The
> result is an archive file with the following naming scheme: st.2001.ip
> (State, year, file type i.e, inpatient).
>
> Problem is when I attempt to inflate the files on unix (with "unzip
> st.2001.ip") I get an error along the lines of "end of central
> directory not found."
>
> The command "file" tells me the type of file is "data" and not "Zip
> Archive" as I would hope.
>
> I was told the problem is that the files are ASCII and not binary as
> they should be.
>
> Is there anyway to unzip ASCII files in unix. If so, I'd appreciate the
> code.
>
> Many thanks
>

Did you ftp the files in ASCII mode? If so, go back and get them in
binary mode. A zip archive is not an ASCII file regardless of the
contents. Otherwise, perhaps the "zip" program you used on the IBM
mainframe is not compatible with gzip or info-zip. Can you post the
output of "od -tx1z st.2001.ip | head" ?


--
Like the ski resort of girls looking for husbands and husbands looking
for girls, the situation is not as symmetrical as it might seem.
-- Alan McKay
DataMonkey

2006-12-22, 1:17 pm

Thank you for the response. Turns out the error was on compression
process. Those responsible are resending the files in a proper format.
Regards



> Did you ftp the files in ASCII mode? If so, go back and get them in
> binary mode. A zip archive is not an ASCII file regardless of the
> contents. Otherwise, perhaps the "zip" program you used on the IBM
> mainframe is not compatible with gzip or info-zip. Can you post the
> output of "od -tx1z st.2001.ip | head" ?
>
>
> --
> Like the ski resort of girls looking for husbands and husbands looking
> for girls, the situation is not as symmetrical as it might seem.
> -- Alan McKay


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com