Re: less: extra entries for lesspipe
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
--
--mummert@cs.wcu.edu-----------
The sun's not eternal
That's why there's the blues...
-- Ginsburg
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: