<<< Date Index >>>     <<< Thread Index >>>

Re: mutt-users-digest V1 #1702



Hello,

> > > I ilke this version of muttedit better, actually:
> > > #!/bin/sh
> > >
> > > file=3D$1
> > > if egrep "^Subject:" $file | egrep -q "<eom>\$" ; then
> > >  touch $file
> > > else
> > >  vi $file
> > > fi
> >
> > Is there a reason not to use
> >
> >    if egrep -q '^Subject: .*<eom>$' $file ; then
> 
> Well, if you're stupid (like myself), there is.  If you're smart enough to
> notice my extra step, there's no reason not to combine them into one ;-)
> 
> > Am I missing some subtle point? The -q option seems to be specific to
> > GNU grep, by the way.
> 
> Yeah, here's a more portable way to do it:
> if egrep -q '^Subject: .*<eom>$' $file >/dev/null 2>&1 ; then
Thanks. Just what I was looking for.

Miki