Link to home
Start Free TrialLog in
Avatar of luke_airig
luke_airig

asked on

gzipped/compressed files as input to

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?
Avatar of ozo
ozo
Flag of United States of America image

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...
 
 
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
which pipes a.gz to -, but uncompresses b.gz to a temp file

ozo, where did you find this information? I'm interested too :-)
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)
It's so easy: just reading what's written :-))
Thanx ozo.

luke_airig, sorry but I think my answer doesn't solve your problem :-(
It solves half the problem.
Which may be enough...
(But surely there must be a utility somewhere
to connect two /dev/pipe devices together?)



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



Avatar of luke_airig
luke_airig

ASKER

ahoffman and ozo,

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