Solved

gzipped/compressed files as input to

Posted on 1997-08-28
9
308 Views
Last Modified: 2010-04-21
i want to comm or diff two files that are gzipped and i am pressed for space.  is there any way to 'gunzip -c' the files and pipe them directly to comm or diff?
0
Comment
Question by:luke_airig
  • 5
  • 3
9 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 2006837
You can pipe one of them to comm or diff as the filename -

piping two may be more difficult...
perhaps you could manage to pipe to /dev/pty...
 
 
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 10 total points
ID: 2006838
If you have gzip/gunzip, you also should have zdiff:
      zdiff a.gz b.gz

0
 
LVL 84

Expert Comment

by:ozo
ID: 2006839
which pipes a.gz to -, but uncompresses b.gz to a temp file

0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 51

Expert Comment

by:ahoffmann
ID: 2006840
ozo, where did you find this information? I'm interested too :-)
0
 
LVL 84

Expert Comment

by:ozo
ID: 2006841
cat `which zdiff`

Also, running it and seeing:
- /tmp/b differ: char n, line m
gives a clue
(if that's what ahoffmann is asking)
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 2006842
It's so easy: just reading what's written :-))
Thanx ozo.

luke_airig, sorry but I think my answer doesn't solve your problem :-(
0
 
LVL 84

Expert Comment

by:ozo
ID: 2006843
It solves half the problem.
Which may be enough...
(But surely there must be a utility somewhere
to connect two /dev/pipe devices together?)



0
 
LVL 84

Expert Comment

by:ozo
ID: 2006844
It solves half the problem.
Which may be enough...
(But surely there must be a utility somewhere
to connect two /dev/pipe devices together?)



0
 

Author Comment

by:luke_airig
ID: 2006845
ahoffman and ozo,

zdiff is exactly what i needed.  thanks for your help.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question