Re: less: extra entries for lesspipe

1998-04-24 Thread drow
On %M 0, Darren/Torin/Who Ever... wrote

(that I had a broken mutt setup...)

 -BEGIN PGP SIGNED MESSAGE-
 
 Manoj Srivastava, in an immanent manifestation of deity, wrote:
 
 That's a reason not to make it a binary.  Even reading a config file
 would probably be too slow.  Hmm.  Maybe when I've got some time slices
 in my brain, I can work on this...


Well, it's a simple enough little program that perhaps...
Some sort of config file which could be used to generate a program?  In
the short term, perl, but perhaps C templates could be worked out.  Maybe
as a separate package - lessopen-c, depending on a c compiler?

Dan


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-24 Thread Manoj Srivastava
Hi,
Oh. Well, I have a local lessopen script that takes precedence
 over the /usr/bin things. I like seeing as much of the stuff as
 possible (like looking at tar files one can read the README file
 without having to untar and read and delete stuff later?)

I do not think my particular lessopen is a godd default
 either; I woud like the default to be minimalistic with the least
 surprise principle (strings for a binarty is not least surprise)

manoj
-- 
 Justice is incidental to law and order. Edgar Hoover
Manoj Srivastava  [EMAIL PROTECTED] http://www.datasync.com/%7Esrivasta/
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E


#!/bin/sh
case $1 in
*.tar.gz|*.tgz|*.tar.Z)
tar tzvvf $1 
zcat $1 
;;
*.Z|*.gz)
gunzip -c $1
;;
*.bz2)
bunzip2 -ckd $1
;;
*.bz)
bunzip -ckd $1
;;
*.tar)
tar tvf $1 
cat $1
;;
*.deb)
echo $1:; 
dpkg --info $1; 
echo -e '\n*** Contents:'; 
dpkg-deb --contents $1 
;;
*.zip|*.ZIP)
if [ -x /usr/bin/unzip ]; then 
unzip -v $1; 
else 
echo No unzip available; 
fi 
;;
*.arj|*.ARJ)
if [  -x /usr/bin/unarj ]; then
unarj -v $1;
else
echo No unarj available;
fi
;;
*.gif|*.jpeg|*.jpg|*.pcd|*.png|*.tga|*.tiff|*.tif)
if [ -x /usr/X11R6/bin/identify ]; then 
/usr/X11R6/bin/identify $1;
else 
echo -e No identify available
echo -e Install ImageMagick to browse images; 
fi 
;;
esac



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-24 Thread Carl Mummert
Darren/Torin/Who Ever... wrote:
 
  I am bemoaning the fact that lesspipe is not directly usable
  by me anymore, since all the stuff got added to it.
 
 I'm open to suggestions on how to change it so that everybody is
 happy...
 
 What about an environment variable about what items to use/not-use.  I
 think a config file would have too much overhead.

Why?  It is trivial to write a script for lessopen, and each user can have
their own via their .profile.  Users who want to find out how to make
lesspipe do more can find resources to write their own at the same place
where they WOULD have found the documentation on the environment vars.

I use lesspipe for things such as .deb files, compressed manpages, etc.

But I agree with manoj that a good compromise for the distribution would
to have the default (/usr/bin) lessppe do very little.

I think that the only universally-agreed-upon behavior for lesspipe is
to run gzip -dc on a compresed file so that you can see the contents.
This could then be the limit to the default lesspipe functionality.

Carl

-- 
[EMAIL PROTECTED]
  
The sun's not eternal
   That's why there's the blues...
 -- Ginsburg


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-23 Thread Raul Miller
Carl Mummert [EMAIL PROTECTED] wrote:
 But when you say, 'less binfile', what do you expect it to do?  

Pretty much the same thing view binfile does.

Note also that the real problem lesspipe was designed for would be
better addressed by a compressed file system.

-- 
Raul


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-23 Thread Manoj Srivastava
Hi,
Carl == Carl Mummert [EMAIL PROTECTED] writes:

Carl Joey Hess wrote:

  I would also find it disorienting to less a binary executable and
 get a long list of identifiers.  I _expect_ a screen full of
 garbage, and that /lib/ld-linux.so.2 in a particular position :-)

Carl What would be the use of looking at a screen full of control
Carl characters? I can see prepending the output of strings with
Carl other useful stuff, though;

Just because you do not see a need does not mean that there is
 no use for that feature. If you want to run strings on a binary, you
 know how to do so. From the principle of least surprise, I say leave
 the default alone (I hate how it does tar zvvft already; I used to be
 able to look at text files in a tar.gz archive without running
 through hoops. But no, the default could not be left well enough
 alone). 

manoj
 who is tired of progras who think they are more intelligent than the humans
-- 
 Percentage of Redbook readers who say they would rather have their
 genitals permanently numbed than go deaf: 70 Harper's Index
Manoj Srivastava  [EMAIL PROTECTED] http://www.datasync.com/%7Esrivasta/
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-23 Thread Darren/Torin/Who Ever...
-BEGIN PGP SIGNED MESSAGE-

Richard Braakman, in an immanent manifestation of deity, wrote:
One reason I like less is that it's so fast.  I sometimes use it on
thousands of files at once.  (For example, when searching a source
package for uses of a particular identifier).

I've been thinking about that.  (When not mono-focused on this grant.)
In slink, I'm thinking of re-writing lessopen in C so that it will be
faster.  Shell scripts are slow, so is starting up Perl a lot.  Loading
binaries is fast.

This seems like a bad idea.  strings is not the obvious information
to provide about an executable.  (Consider size, objdump, od, hexdump, 
et cetera).

Okay.  Sounds good to me.  I wanted at least one objection though so
that I wasn't just disregarding the user's request out of hand.

Darren

P.S.  less is ready and waiting on master.  The new Perl package on the
other hand isn't but should be done this weekend if I can get this grant 
out of the way.
- -- 
[EMAIL PROTECTED] http://www.daft.com/~torin [EMAIL PROTECTED] [EMAIL 
PROTECTED]
Darren Stalder/2608 Second Ave, @282/Seattle, WA 98121-1212/USA/+1-800-921-4996
@ Sysadmin, webweaver, postmaster for hire.  C/Perl/CGI programmer and tutor. @
@Make a little hot-tub in your soul.  @

-BEGIN PGP SIGNATURE-
Version: 2.6.3a
Charset: noconv
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBNT7yk44wrq++1Ls5AQHhLAQAnJ64sJZHowv/oQPQMWjFrJaGpivRFlAs
ZYswO3REW0asoIgjWjYF6J7zYWddNJURXkYfKWpkbRXXgxfTpr36ocm083YyflKd
hJB3R+ghegapnkrO81sPon9KUQpWdcNnC3Y6+vi5qyGUEyOyffr+Ts4xJZHdkYVw
DgQbyaE6v5E=
=qMOJ
-END PGP SIGNATURE-


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-23 Thread Darren/Torin/Who Ever...
-BEGIN PGP SIGNED MESSAGE-

Carl Mummert, in an immanent manifestation of deity, wrote:
useful information when you use it on different types of files-- gzip for
gz files, tar -t for tar files, groff for manpages, etc...  If I _wanted_
to look at the raw data of a gzipped file, I could do it.  But how often

Note that while I have control of lessopen, it will never, ever
interpret any kind of text files such as manpages, html, etc.

Darren
- -- 
[EMAIL PROTECTED] http://www.daft.com/~torin [EMAIL PROTECTED] [EMAIL 
PROTECTED]
Darren Stalder/2608 Second Ave, @282/Seattle, WA 98121-1212/USA/+1-800-921-4996
@ Sysadmin, webweaver, postmaster for hire.  C/Perl/CGI programmer and tutor. @
@Make a little hot-tub in your soul.  @

-BEGIN PGP SIGNATURE-
Version: 2.6.3a
Charset: noconv
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBNT70U44wrq++1Ls5AQFuPwP/bvZW58h2v3lvn4oo2XX4FB/WqgNT8TCP
lJDYRW3/RuBoaBzbjLo48thtfkUFhR9AFkSCYmOlaLX17Qascak3StlXEkOoA1ct
4XpZ23Wm0l+EGfo0Y/3Cmth9bRHyH/n/eHg0cRTF5tU8dPR+8ypFk0Ir8+QfSnkb
pr1LPSdY86s=
=X96m
-END PGP SIGNATURE-


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-23 Thread Darren/Torin/Who Ever...
-BEGIN PGP SIGNED MESSAGE-

Manoj Srivastava, in an immanent manifestation of deity, wrote:
 know how to do so. From the principle of least surprise, I say leave
 the default alone (I hate how it does tar zvvft already; I used to be
 able to look at text files in a tar.gz archive without running
 through hoops. But no, the default could not be left well enough

Uh, Manoj, if you don't want less to interpret things for, just don't
use lessopen.  If you still want to use it, you can just edit the
lessopen script.

That's a reason not to make it a binary.  Even reading a config file
would probably be too slow.  Hmm.  Maybe when I've got some time slices
in my brain, I can work on this...

Darren
- -- 
[EMAIL PROTECTED] http://www.daft.com/~torin [EMAIL PROTECTED] [EMAIL 
PROTECTED]
Darren Stalder/2608 Second Ave, @282/Seattle, WA 98121-1212/USA/+1-800-921-4996
@ Sysadmin, webweaver, postmaster for hire.  C/Perl/CGI programmer and tutor. @
@Make a little hot-tub in your soul.  @

-BEGIN PGP SIGNATURE-
Version: 2.6.3a
Charset: noconv
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBNT71JI4wrq++1Ls5AQF1WgP+MYu/cH3z07gfURvmtmumdSEA88trdozX
k2NjlydUvxlePS768g/M4Zhk3d94h/Rc9G53d4OiEOstTtrUtiiUVOyxSGHqyDe6
you7zjs/L0HHHavB1Qja0YAei6dOzTbCgswPyJyaIJS+pwd37/Bs/bOcLI5B6tOr
kiBW/DoRGb0=
=SmVS
-END PGP SIGNATURE-


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-23 Thread Manoj Srivastava
Hi,
Darren == Darren Stalder [EMAIL PROTECTED] writes:


Darren Uh, Manoj, if you don't want less to interpret things for,
Darren just don't use lessopen.  If you still want to use it, you can
Darren just edit the lessopen script.

I know that. The accepted way of using less used to be to use
 a upstream filter. Right now, it is done like so:
__
__ printenv | grep -i less
PAGER=less -ciM
LESSOPEN=|lessopen %s
LESS=-ciMP?f%f :std in .?n?m(file %i of %m) ..?ltline %lt :byte %bB?s/%s 
..?e(END) ?x- Next\: %x.:?pB%pB\%..%t
LESSCHARSET=latin1
__ eval $(lesspipe)
__ printenv | grep -i less
PAGER=less -ciM
LESSCLOSE=/usr/bin/lesspipe '%s' '%s'
LESSOPEN=| /usr/bin/lesspipe '%s'
LESS=-ciMP?f%f :std in .?n?m(file %i of %m) ..?ltline %lt :byte %bB?s/%s 
..?e(END) ?x- Next\: %x.:?pB%pB\%..%t
LESSCHARSET=latin1
__

See how the distribution now uses lesspipe?

I am bemoaning the fact that lesspipe is not directly usable
 by me anymore, since all the stuff got added to it.

manoj

-- 
 Aren't you glad you're not getting all the government you pay for
 now?
Manoj Srivastava  [EMAIL PROTECTED] http://www.datasync.com/%7Esrivasta/
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-23 Thread Marcus Brinkmann
On Thu, Apr 23, 1998 at 12:49:43AM -0700, Darren/Torin/Who Ever... wrote:
 -BEGIN PGP SIGNED MESSAGE-
 
 This seems like a bad idea.  strings is not the obvious information
 to provide about an executable.  (Consider size, objdump, od, hexdump, 
 et cetera).
 
 Okay.  Sounds good to me.  I wanted at least one objection though so
 that I wasn't just disregarding the user's request out of hand.

Please collect flashy examples and provide them with the package, possibly
with one line comments. Thsi would make life for newbies easier, for
interested people it would be something to get starting with and all the
prof's can improve it without caring about defaults ;)

Thank you,
Marcus

-- 
Rhubarb is no Egyptian god.Debian GNU/Linuxfinger brinkmd@ 
Marcus Brinkmann   http://www.debian.orgmaster.debian.org
[EMAIL PROTECTED]for public  PGP Key
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/   PGP Key ID 36E7CD09


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-22 Thread Joey Hess
Richard Braakman wrote:
  I've added the if binary executable, use strings on it to lessopen.  I
  could see marginal use for looking at the raw executable, so if anyone
  has any objections, speak up before Saturday Night (-0800Z) or file a
  bug against less and I'll take it out.  (cc'ing debian-devel for a wider
  audience)
 
 This seems like a bad idea.  strings is not the obvious information
 to provide about an executable.  (Consider size, objdump, od, hexdump, 
 et cetera).
 
 I only use strings when I pipe through grep.  When I use less it's
 just as easy to search the file directly.
 
 I would also find it disorienting to less a binary executable and get
 a long list of identifiers.  I _expect_ a screen full of garbage, and
 that /lib/ld-linux.so.2 in a particular position :-)

Chiming in a little late -- I agree with Richard 100%.

-- 
see shy jo


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-22 Thread Carl Mummert
Joey Hess wrote:
  
  This seems like a bad idea.  strings is not the obvious information
  to provide about an executable.  (Consider size, objdump, od, hexdump, 
  et cetera).
  
  I only use strings when I pipe through grep.  When I use less it's
  just as easy to search the file directly.

  I would also find it disorienting to less a binary executable and get
  a long list of identifiers.  I _expect_ a screen full of garbage, and
  that /lib/ld-linux.so.2 in a particular position :-)

What would be the use of looking at a screen full of control characters?
I can see prepending the output of strings with other useful stuff,
though;

how about this:

replace in lesspipe.sh
if [ $FILE1 = Linux/i386 -o $FILE2 = Linux/i386 \
 -o $FILE1 = ELF -o $FILE2 = ELF ]; then
  strings $1
fi ;;

with:
if [ $FILE1 = Linux/i386 -o $FILE2 = Linux/i386 \
 -o $FILE1 = ELF -o $FILE2 = ELF ]; then
  file $1; 
  echo -e \nsize:; 
  size $1; 
  echo -e \nldd:;
  ldd $1;
  echo -e \nstrings:;
  strings $1;
fi ;;

This produces, on my system, a very pretty screenful of useful info.

After all, if I am just looking for instances of a var, I can use grep as
mentioned above.  But this set of commands gives me a lot of useful stuff
with only command.

Carl

-- 
[EMAIL PROTECTED]
  
The sun's not eternal
   That's why there's the blues...
 -- Ginsburg


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-22 Thread Mark W. Eichin

 What would be the use of looking at a screen full of control characters?

Because when I look at a binary with less, I *mean* to do
that... usually to look for corruption (blocks of nulls) or things
like *short* strings or strings not in the text section, that
strings *won't find*.

 mentioned above.  But this set of commands gives me a lot of useful stuff
 with only command.

Sure -- but it should be a *different* command than less...

Mostly I'm being lazy, of course - I haven't needed to know how to
disable lesspipe for my own use; if this gets added, I will.  Someone
else may have to judge if this is a useful thing for naive users...


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-22 Thread Ben Pfaff
What would be the use of looking at a screen full of control characters?

   Because when I look at a binary with less, I *mean* to do
   that... usually to look for corruption (blocks of nulls) or things
   like *short* strings or strings not in the text section, that
   strings *won't find*.

No kidding.  I do the same thing quite often myself, generally when
I'm debugging a low-level tool.  However, you can get around this, if
lesspipe is `too smart', by simply doing `cat binary|less' instead of
`less binary'.

So I think the default should be to give some sort of useful display
for a binary file, although a display from `strings' is not my idea of
`useful'.  OTOH, the output of `objdump' or `nm -s' might often be
useful.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-22 Thread David Welton
On Wed, Apr 22, 1998 at 01:17:27PM -0400, Ben Pfaff wrote:
 What would be the use of looking at a screen full of control characters?
 
Because when I look at a binary with less, I *mean* to do
that... usually to look for corruption (blocks of nulls) or things
like *short* strings or strings not in the text section, that
strings *won't find*.
 
 No kidding.  I do the same thing quite often myself, generally when
 I'm debugging a low-level tool.  However, you can get around this, if
 lesspipe is `too smart', by simply doing `cat binary|less' instead of
 `less binary'.

One of the things I like about Linux, and Unix in general, is that it
doesn't try to be smart where you don't expect it to.

I think that if users want to see 'nm' or strings or whatever, they
can do those things. nm binary | less, or whatever..  Let's leave the
default alone:-

Ciao,
-- 
David Welton  http://www.efn.org/~davidw 

Debian GNU/Linux - www.debian.org


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-22 Thread Carl Mummert
David Welton wrote:
 One of the things I like about Linux, and Unix in general, is that it
 doesn't try to be smart where you don't expect it to.

But when you say, 'less binfile', what do you expect it to do?  

I had thought that the idea of lesspipe is to have less give you more
useful information when you use it on different types of files-- gzip for
gz files, tar -t for tar files, groff for manpages, etc...  If I _wanted_
to look at the raw data of a gzipped file, I could do it.  But how often
do I want to do that?  

Having less display a plethora of information about an executable ( file,
size, ldd, strings, etc) seems to me to be more useful for everyday use
than having less show me the raw data.

If, as you say, the more common case is that you want to look at the
raw data of an executable, then I withdraw my claim.  However, I think
that the majority of users would find well-readable information more
useful.  

Carl

-- 
[EMAIL PROTECTED]
  
The sun's not eternal
   That's why there's the blues...
 -- Ginsburg


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-22 Thread David Welton
On Wed, Apr 22, 1998 at 04:15:51PM -0400, Carl Mummert wrote:
 David Welton wrote:
  One of the things I like about Linux, and Unix in general, is that it
  doesn't try to be smart where you don't expect it to.
 
 But when you say, 'less binfile', what do you expect it to do?  

Show me the contents of the file.  If I want to interpret those
contents before I see them, then I'll pipe them.  If not, then I
expect it to do little else.
 
 I had thought that the idea of lesspipe is to have less give you more
 useful information when you use it on different types of files-- gzip for
 gz files, tar -t for tar files, groff for manpages, etc...  If I _wanted_
 to look at the raw data of a gzipped file, I could do it.  But how often
 do I want to do that?  

It sounds like a handy little program, maybe we should give it a
different name, like 'nless' or something similiar.  We already have a
zless, so, why not build on that and just use a different name.  Or is
there something that I am missing because of my late entry into the
discussion (sorry)?

Thanks,
-- 
David Welton  http://www.efn.org/~davidw 

Debian GNU/Linux - www.debian.org


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-22 Thread Carl Mummert
David Welton wrote:
 zless, so, why not build on that and just use a different name.  Or is
 there something that I am missing because of my late entry into the
 discussion (sorry)?

Background: when 'less' runs, it looks for an environment var called
LESSOPEN If it finds one, it uses the value to spawn a process from
which less will display the standard output.  The usual usage of this is
to automatically unzip .gz files, so you don't have to do so by hand.
Another common use is to run tar -t on tar files so that you see the list
of files inside, insead of contral characters

The general question is, how much do we want this lessopen program to do?
The specific queston is, what should it do with binaries?

The old solution was to run strings on the binaries, which was less
than acceptable.  Several people rightly complained about that.

The new question is, which is better: a lot of info about the binary file,
or the contents?

I have been convinced that there is some utility in looking at the raw
files; I also see some utility in information about the files.

However, since the lessopen program is only a shell script, I think the
best solution may be to leave binaries alone and allow users to add
entries for them if the users so wish.  

Carl
-- 
[EMAIL PROTECTED]
  
The sun's not eternal
   That's why there's the blues...
 -- Ginsburg


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-17 Thread Darren/Torin/Who Ever...
-BEGIN PGP SIGNED MESSAGE-

I can't add the /proc entries since you don't know the full pathname of
the file you are viewing.  I could use `pwd` to find out what directory
I'm in.  If you'd like me to do that, just say so but it would involve
another fork/exec for every file.  (All the others are by file-type).

I've added the if binary executable, use strings on it to lessopen.  I 
could see marginal use for looking at the raw executable, so if anyone
has any objections, speak up before Saturday Night (-0800Z) or file a
bug against less and I'll take it out.  (cc'ing debian-devel for a wider 
audience)

Darren
- -- 
[EMAIL PROTECTED] http://www.daft.com/~torin [EMAIL PROTECTED] [EMAIL 
PROTECTED]
Darren Stalder/2608 Second Ave, @282/Seattle, WA 98121-1212/USA/+1-800-921-4996
@ Sysadmin, webweaver, postmaster for hire.  C/Perl/CGI programmer and tutor. @
@Make a little hot-tub in your soul.  @

-BEGIN PGP SIGNATURE-
Version: 2.6.3a
Charset: noconv
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBNTcirI4wrq++1Ls5AQF/BgP/WNSbLqcCkY1iUV9pfRx0U1a1jPckL+bu
XkC5RBBG4PTX6vtn+HvTt5tdU6U3tOsi8TEPJOgJZ+Z8hfa/amOJzHhOikzVyYtK
AA+WZ0tDhpJZhPSMPXv2na0UGLgndpamJcM09s2wsz1CurjVrHsele4In0DsYZ4G
3k1fBIA0ZT0=
=eDKJ
-END PGP SIGNATURE-


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: less: extra entries for lesspipe

1998-04-17 Thread Richard Braakman
Darren/Torin/Who Ever... wrote:
 I can't add the /proc entries since you don't know the full pathname of
 the file you are viewing.  I could use `pwd` to find out what directory
 I'm in.  If you'd like me to do that, just say so but it would involve
 another fork/exec for every file.  (All the others are by file-type).

One reason I like less is that it's so fast.  I sometimes use it on
thousands of files at once.  (For example, when searching a source
package for uses of a particular identifier).

 I've added the if binary executable, use strings on it to lessopen.  I
 could see marginal use for looking at the raw executable, so if anyone
 has any objections, speak up before Saturday Night (-0800Z) or file a
 bug against less and I'll take it out.  (cc'ing debian-devel for a wider
 audience)

This seems like a bad idea.  strings is not the obvious information
to provide about an executable.  (Consider size, objdump, od, hexdump, 
et cetera).

I only use strings when I pipe through grep.  When I use less it's
just as easy to search the file directly.

I would also find it disorienting to less a binary executable and get
a long list of identifiers.  I _expect_ a screen full of garbage, and
that /lib/ld-linux.so.2 in a particular position :-)

Richard Braakman


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]