Install less, antiword, unrtf and cdrtools.
Next make sure less is setup to use the lesspipe.sh script. From the shell type
echo $LESSOPEN
You should see something like this:
$ echo $LESSOPEN
|/usr/bin/lesspipe.sh %s
Next, open /usr/bin/lesspipe.sh, find the *gif and add the following lines above, you file should wind up looking like this:
*.doc) antiword "$1";;
*.rtf) unrtf --nopict --text "$1" ;;
*.iso) isoinfo -d -i "$1" ; isoinfo -lJ -i "$1";;
*.gif|*.jpeg|*.jpg|*.pcd|*.png|*.tga|*.tiff|*.tif)
It should now be possible to 'less word.doc' 'less word.rtf' or 'less cd.iso'.
No comments:
Post a Comment