2 # This is a preprocessor for 'less'. It is used when this environment
3 # variable is set: LESSOPEN="|lesspipe.sh %s"
7 *.tar) tar tvvf $1 2>/dev/null ;; # View contents of .tar and .tgz files
8 *.tgz|*.tar.gz|*.tar.Z|*.tar.z) gzip -dc $1 | tar tvvf - 2>/dev/null ;;
9 *.tar.bz2) bzip2 -dc $1 | tar tvvf - 2>/dev/null ;;
10 *.zip) unzip -l $1 2>/dev/null ;;
12 groff -te -Tascii -mandoc $1 ;;
14 gzip -dc $1 | groff -te -Tascii -mandoc ;;
15 *.Z|*.z|*.gz) gzip -dc $1 2>/dev/null ;; # View compressed files correctly
16 *.bz2) bzip2 -dc $1 2>/dev/null ;; # View compressed files correctly
17 # *) FILE=`file -L $1` ; # Check to see if binary, if so -- view with 'strings'
18 # FILE1=`echo $FILE | cut -d ' ' -f 2`
19 # FILE2=`echo $FILE | cut -d ' ' -f 3`
20 # if [ "$FILE1" = "Linux/i386" -o "$FILE2" = "Linux/i386" \
21 # -o "$FILE1" = "ELF" -o "$FILE2" = "ELF" ]; then