Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / miscellany / multi-media / misc / mimeless
1 #!/bin/sh
2 : mhn-show-text/plain: mimeless "%d" text/%s '%F'
3
4 if [ $# != 3 ]; then
5   echo "usage: $0 message-1 message-2 file-name" 1>&2
6   exit 1
7 fi
8
9 if [ ! -r $3 ]; then
10   echo "File does not exist." 1>&2
11   exit 1
12 fi
13
14 msg1=`echo $1 | sed -e 's/\%/\\\%/g' -e 's/\?/\\\?/g' -e 's/:/\\:/g' \
15                 -e 's/\./\\\./g' -e 's/\"/\\\"/g'`
16 msg2=`echo $2 | sed -e 's/\%/\\\%/g' -e 's/\?/\\\?/g' -e 's/:/\\:/g' \
17                 -e 's/\./\\\./g' -e 's/\"/\\\"/g'`
18
19 exec less -P"\"${msg1}\" ${msg2} ?pB%pB\%.%t" $3