On Tue, May 18, 2010 at 10:26:00 +0100, Mark Adams wrote:
> You need to specify -c with pbzip2 to have it compress to stdout I
> believe. If you just run it by itself;
> 
> pbzip2
> pbzip2: *ERROR: Won't write compressed data to terminal.  Aborting!
> 
> pbzip2 -h
> 
> Usage: pbzip2 [-1 .. -9] [-b#cdfhklm#p#qrS#tVz] <filename> <filename2>
> <filenameN>


I'm not familiar with bpzip2 specifically, but note that the error
message includes the words "to terminal", which makes me think it
probably acts like gzip and bzip2.  In the case of those programs, at
least, the compression command actually behaves differently when run
with stdout connected to a terminal as opposed to within a pipe:

  $ echo "some content" | gzip
  gzip: compressed data not written to a terminal. Use -f to force compression.
  For help, type: gzip -h

  $ echo "some content" | gzip | cat
  [actual compressed data here ...]



  $ echo "some content" | bzip2 
  bzip2: I won't write compressed data to a terminal.
  bzip2: For help, type: `bzip2 --help'.

  $ echo "some content" | bzip2  | cat
  [actual compressed data here ...]


                                                        Nathan

----------------------------------------------------------------------------
Nathan Stratton Treadway  -  [email protected]  -  Mid-Atlantic region
Ray Ontko & Co.  -  Software consulting services  -   http://www.ontko.com/
 GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt   ID: 1023D/ECFB6239
 Key fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239

Reply via email to