wessel@kub.nl (Wessel Kraay) (01/03/91)
Does anyone know of a shell script to convert MH-folders to mush folders? Any pointers are appreciated. -----------------------------Wessel Kraaij--------------------------- Institute for Language Technology and Artificial Intelligence ITK Tilburg-University E-mail: wessel@kub.nl p.o box 90153 5000 LE Tilburg-Netherlands phone: (+31) 13 663117 ---------------------------------------------------------------------
minmin@astec.co.jp (Masato Minda) (01/05/91)
In article <1991Jan03.090031.5159@kub.nl> wessel@kub.nl (Wessel Kraay) writes: >Does anyone know of a shell script to convert MH-folders to mush folders? I am using these shell scirpts. But ``From '' line is incorrect. MinMin #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of shell archive." # Contents: mhtombox newstombox # Wrapped by minmin@tamtam on Sat Jan 5 21:05:00 1991 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'mhtombox' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mhtombox'\" else echo shar: Extracting \"'mhtombox'\" \(187 characters\) sed "s/^X//" >'mhtombox' <<'END_OF_FILE' X: for i in $* do X egrep From: $i | head -1 | sed s/From:/From/ | awk '{printf "%s", $0}' X egrep Date: $i | sed -e s/,// | awk '{print " " $2 " " $4 " " $3 " " $6 " " 19 $5}' X cat $i done END_OF_FILE if test 187 -ne `wc -c <'mhtombox'`; then echo shar: \"'mhtombox'\" unpacked with wrong size! fi chmod +x 'mhtombox' # end of 'mhtombox' fi if test -f 'newstombox' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'newstombox'\" else echo shar: Extracting \"'newstombox'\" \(293 characters\) sed "s/^X//" >'newstombox' <<'END_OF_FILE' X: if [ $# = 0 ] || [ ! -f $1 ] then X echo "Usage: `basename $0` file ..." 1>&2 X exit 1 fi X for i in $* do X if test -f $i X then X head -20 $i | egrep From: | sed s/From:/From/ | awk '{printf "%s ", $0}' X date | sed 's/JST //' X cat $i X else X echo "$i: not found." 1>&2 X fi done END_OF_FILE if test 293 -ne `wc -c <'newstombox'`; then echo shar: \"'newstombox'\" unpacked with wrong size! fi chmod +x 'newstombox' # end of 'newstombox' fi echo shar: End of shell archive. exit 0 -- minmin Masato Minda ASTEC, Inc. <minmin@astec.co.jp>