compress vs: bzip2 - SCO
This is a discussion on compress vs: bzip2 - SCO ; When a file is compressed with 'compress' ... a user can use
'more' on that compressed file and it automatically uncompresses
for reading.
When a file is compressed with 'bzip2'....... a user *cannot* use
'more' on that compressed file.
Is ...
-
compress vs: bzip2
When a file is compressed with 'compress' ... a user can use
'more' on that compressed file and it automatically uncompresses
for reading.
When a file is compressed with 'bzip2'....... a user *cannot* use
'more' on that compressed file.
Is there a flag, variable or command switch somewhere that will allow:
# more /usr/file.bzip2
Many Thanks in advance,
Jeff H
-
Re: compress vs: bzip2
Jeff Hyman typed (on Fri, Sep 15, 2006 at 04:39:53PM -0400):
|
| When a file is compressed with 'compress' ... a user can use
| 'more' on that compressed file and it automatically uncompresses
| for reading.
|
| When a file is compressed with 'bzip2'....... a user *cannot* use
| 'more' on that compressed file.
|
| Is there a flag, variable or command switch somewhere that will allow:
|
| # more /usr/file.bzip2
I use less, rather than more, and in my environemnt I have set
LESSOPEN=|lesspipe %s
/usr/local/bin/lesspipe is a little shell script:
#!/bin/ksh
#@(#) lesspipe; JPRadley 17Nov 99 v 1.0
#@(#) invoked by 'less' when the env.var. LESSOPEN='|lesspipe %s'
case "$1" in
*.gz|*.tgz|*.Z) zcat $1 2>/dev/null ;;
*.bz2|*tb2) bzcat $1 2>/dev/null ;;
esac
--
JP
==> http://www.frappr.com/cusm <==
-
Re: compress vs: bzip2
In article <20060915203953.GA15289@lonestar.cactus.com>,
Jeff Hyman wrote:
>
>When a file is compressed with 'compress' ... a user can use
>'more' on that compressed file and it automatically uncompresses
>for reading.
>
>When a file is compressed with 'bzip2'....... a user *cannot* use
>'more' on that compressed file.
>
>Is there a flag, variable or command switch somewhere that will allow:
>
># more /usr/file.bzip2
>
>Many Thanks in advance,
>Jeff H
A program I use is called 'most'. You can throw anything at it.
It will automaticaly handle bz2, and if you run 'most' on a binary
it goes into a standard display such as you'd see with od/hd, with
hex on the left side and test on the right side.
Bill
--
Bill Vermillion - bv @ wjv . com
-
Re: compress vs: bzip2
Jean-Pierre Radley typed (on Fri, Sep 15, 2006 at 04:53:25PM -0400):
| Jeff Hyman typed (on Fri, Sep 15, 2006 at 04:39:53PM -0400):
| |
| | When a file is compressed with 'compress' ... a user can use
| | 'more' on that compressed file and it automatically uncompresses
| | for reading.
| |
| | When a file is compressed with 'bzip2'....... a user *cannot* use
| | 'more' on that compressed file.
| |
| | Is there a flag, variable or command switch somewhere that will allow:
| |
| | # more /usr/file.bzip2
|
|
| I use less, rather than more, and in my environemnt I have set
| LESSOPEN=|lesspipe %s
|
| /usr/local/bin/lesspipe is a little shell script:
|
|
| #!/bin/ksh
| #@(#) lesspipe; JPRadley 17Nov 99 v 1.0
| #@(#) invoked by 'less' when the env.var. LESSOPEN='|lesspipe %s'
|
| case "$1" in
| *.gz|*.tgz|*.Z) zcat $1 2>/dev/null ;;
| *.bz2|*tb2) bzcat $1 2>/dev/null ;;
| esac
|
| --
| JP
| ==> http://www.frappr.com/cusm <==
JP,
I tried 'less'... but I think theres a minor problem
somewhere else. Questions at the bottom.
Also... I do not have 'bzcat' thats in your script.
SCO 3.2v5.0.6
# ls -ls Master_Sep.13.bz2
1996 -rw-rw-rw- 1 root sys 1016039 Sep 13 23:25 Master_Sep.13.bz2
# grep LESS /.profile
LESS="-ceij4z-4" ;
LESSOPEN="|lesspipe %s" # reads compressed .gz files JPR 6/6/03
export LESS LESSOPEN
# less Master_Sep.13.bz2
Master_Sep.13.bz2 may be a binary file. See it anyway?
If I answer 'y'... I get garbage.
# type less
less is /usr/bin/less
# what less
less:
more SCO OpenServer 5.0.6a 2001-02-26
1. Is 'less' supposed to be linked to 'more'?
2. Is there a newer version of 'less' I should have?
3. Is there a flag I need to set in some cfg file?
4. Do I need 'bzcat' ?
Thanks JP!
- Jeff H
-
Re: compress vs: bzip2
Jeff Hyman typed (on Sun, Sep 17, 2006 at 07:16:28PM -0400):
| Jean-Pierre Radley typed (on Fri, Sep 15, 2006 at 04:53:25PM -0400):
| | Jeff Hyman typed (on Fri, Sep 15, 2006 at 04:39:53PM -0400):
| | |
| | | When a file is compressed with 'compress' ... a user can use
| | | 'more' on that compressed file and it automatically uncompresses
| | | for reading.
| | |
| | | When a file is compressed with 'bzip2'....... a user *cannot* use
| | | 'more' on that compressed file.
| | |
| | | Is there a flag, variable or command switch somewhere that will allow:
| | |
| | | # more /usr/file.bzip2
| |
| |
| | I use less, rather than more, and in my environemnt I have set
| | LESSOPEN=|lesspipe %s
| |
| | /usr/local/bin/lesspipe is a little shell script:
| |
| |
| | #!/bin/ksh
| | #@(#) lesspipe; JPRadley 17Nov 99 v 1.0
| | #@(#) invoked by 'less' when the env.var. LESSOPEN='|lesspipe %s'
| |
| | case "$1" in
| | *.gz|*.tgz|*.Z) zcat $1 2>/dev/null ;;
| | *.bz2|*tb2) bzcat $1 2>/dev/null ;;
| | esac
| |
| | --
| | JP
| | ==> http://www.frappr.com/cusm <==
|
| JP,
| I tried 'less'... but I think theres a minor problem
| somewhere else. Questions at the bottom.
| Also... I do not have 'bzcat' thats in your script.
bzcat and bunzip2 should exist, as links to bzip2.
| SCO 3.2v5.0.6
|
| # ls -ls Master_Sep.13.bz2
| 1996 -rw-rw-rw- 1 root sys 1016039 Sep 13 23:25 Master_Sep.13.bz2
|
| # grep LESS /.profile
| LESS="-ceij4z-4" ;
| LESSOPEN="|lesspipe %s" # reads compressed .gz files JPR 6/6/03
| export LESS LESSOPEN
|
| # less Master_Sep.13.bz2
| Master_Sep.13.bz2 may be a binary file. See it anyway?
| If I answer 'y'... I get garbage.
Is lessopen in your PATH?
| less is /usr/bin/less
|
| # what less
| less:
| more SCO OpenServer 5.0.6a 2001-02-26
|
| 1. Is 'less' supposed to be linked to 'more'?
Kean did that on 5.0.6. less -V should say it's version 358. and the man
page for less should mention LESSOPEN.
| 2. Is there a newer version of 'less' I should have?
The latest is 394, but LESSOPEN is already a feature in your version.
| 3. Is there a flag I need to set in some cfg file?
Nope.
| 4. Do I need 'bzcat' ?
Yes -- it should be clear that my lessopen script wants to run it.
--
JP
==> http://www.frappr.com/cusm <==
-
Re: compress vs: bzip2
---------------------- clipped ----------------
| | JP,
| | I tried 'less'... but I think theres a minor problem
| | somewhere else. Questions at the bottom.
| | Also... I do not have 'bzcat' thats in your script.
|
| bzcat and bunzip2 should exist, as links to bzip2.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Neither existed, so I made the links. It fixed the problem.
Greatly appreciated JP.
This did the trick.
| | # grep LESS /.profile
| | LESS="-ceij4z-4" ;
| | LESSOPEN="|lesspipe %s" # reads compressed .gz files JPR 6/6/03
| | export LESS LESSOPEN
| |
| | # less Master_Sep.13.bz2
| | Master_Sep.13.bz2 may be a binary file. See it anyway?
| | If I answer 'y'... I get garbage.
|
| Is lessopen in your PATH?
^^^^^^^^
Should this be CAPS? Nothing in my PATH displays "less*" or "LESS*"
'/usr/bin' is in my PATH which is where 'less' resides.
| | less is /usr/bin/less
| |
| | # what less
| | less:
| | more SCO OpenServer 5.0.6a 2001-02-26
| |
| | 1. Is 'less' supposed to be linked to 'more'?
|
| Kean did that on 5.0.6. less -V should say it's version 358. and the man
| page for less should mention LESSOPEN.
Version is 358, LESSOPEN and LESSCLOSE are both mentioned.
|
| | 2. Is there a newer version of 'less' I should have?
|
| The latest is 394, but LESSOPEN is already a feature in your version.
|
| | 3. Is there a flag I need to set in some cfg file?
|
| Nope.
|
| | 4. Do I need 'bzcat' ?
|
| Yes -- it should be clear that my lessopen script wants to run it.
|
| --
| JP
| ==> http://www.frappr.com/cusm <==
-
Re: compress vs: bzip2
Jeff Hyman typed (on Mon, Sep 18, 2006 at 09:53:11PM -0400):
| ---------------------- clipped ----------------
| | | JP,
| | | I tried 'less'... but I think theres a minor problem
| | | somewhere else. Questions at the bottom.
| | | Also... I do not have 'bzcat' thats in your script.
| |
| | bzcat and bunzip2 should exist, as links to bzip2.
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| Neither existed, so I made the links. It fixed the problem.
|
| Greatly appreciated JP.
| This did the trick.
You're welcome.
| | Is lessopen in your PATH?
| ^^^^^^^^
| Should this be CAPS? Nothing in my PATH displays "less*" or "LESS*"
| '/usr/bin' is in my PATH which is where 'less' resides.
Oops, my error. I meant to ask if 'lesspipe' was in your PATH.
Apparently it is, since LESSOPEN is finding it.
--
JP
==> http://www.frappr.com/cusm <==