We help IT Professionals succeed at work.

gzipped/compressed files as input to

luke_airig
luke_airig asked
on
Medium Priority
337 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?
Comment
Watch Question

ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
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...
 
 
If you have gzip/gunzip, you also should have zdiff:
      zdiff a.gz b.gz

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
which pipes a.gz to -, but uncompresses b.gz to a temp file

ozo, where did you find this information? I'm interested too :-)
ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
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 :-(
ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

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



ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

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



Author

Commented:
ahoffman and ozo,

zdiff is exactly what i needed.  thanks for your help.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.