linux-l: LM01/01: lesspipe.sh

Florian Cramer paragram at gmx.net
Di Jan 23 16:34:00 CET 2001


Am Mon, 22.Jan.2001 um 18:02:19 +0100 schrieb Michael Wiedmann:
> Florian Cramer wrote on 010121 16:30 +0100:
> ...
> > !   elif [[ "$1" = *Word* ]]; then
> > !     LESSOPEN=
> > !     antiword "$2"
> 
> Müßte das nicht heißen:
> 
> > !   elif [[ "$1" = *Microsoft\ Office\ Document* ]]; then
> > !     LESSOPEN=
> > !     antiword "$2"

> Zumindest sagt das meine /usr/share/misc/magic.
> 

Meine /usr/share/misc/magic (aus Debian "testing") kennt hier außerdem die
Dateitypen "Microsoft Word document data", "Microsoft Word Document" und
"Microsoft Word 6.0 Document".

Da es aber in der Tat eine Namenskollision mit WordPerfect-Dokumenten geben
könnte, sollte der String statt " *Word* " besser "*Microsoft\ Word*"
heißen.

Die modifizierte lesspipe lege ich auf meine Homepage
http://userpage.fu-berlin.de/~cantsin/hacks.html

(Ich bastele noch nach einer Lösung, Bitmap-Graphiken in "less" als ASCII-Art
zu betrachten.)

Danke, Michael!

Florian

-- 
http://userpage.fu-berlin.de/~cantsin/
http://www.complit.fu-berlin.de/institut/lehrpersonal/cramer.html
PGP public key ID 6440BA05 



Mehr Informationen über die Mailingliste linux-l