Solved

gzipped/compressed files as input to

Posted on 1997-08-28
9
307 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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 2006840
ozo, where did you find this information? I'm interested too :-)
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now