ex editor commands

David Stern (dave@davka.gsfc.nasa.gov)
Wed, 18 Jun 1997 09:07:26 -0400 (EDT)

I'm trying to strip headers from messages saved from usenet news. I have
the correct sed command but rather than create billions and billions
of temporary files, want to run the commands from ex. When I run the script,
it complains about the terminal emulation for ex ie
dumb: Unknow terminal type

I've tried setting/unsetting EXINIT and TERM. Here's part of the script

#!/bin/sh

for file in /scripts/u*
do
# If a line begins with "Newsgroup: " then delete from that line thru first
# blank line
if ( grep -n "^Newsgroups: " $file >/dev/null) ; then
ex - $file <<END
/^Newsgroups: /,/^$/d
w
q
END
fi

done

Ideas?
Thanks

=-=-=-=-=-=-=-=-=- generated by /dev/dave -=-=-=-=-=-=-=-=-=-=-=-=-=-=
David Stern Flight Dynamics
dave@davka.gsfc.nasa.gov Goddard Space Flight Ctr
Building 28 Room N258 301-286-7631