>On 20:26 06 Mar 2002, Vidiot <[EMAIL PROTECTED]> wrote:
>| >Hey everyone, I am trying to make a "FROM" script that basically shows =
>| >the person running the script who the mail is from that they have.
>|
>| How about:
>|
>| sed -e '/^From /b' -e d
>|
>| The only legal from at the beginning is "From "
>
>Too verbose:
>
> sed 1q
>
>works fine since "From " is the first line.
Doesn't that work with only 1 piece of mail in the mailbox? Most mail boxes
have more than one piece of mail.
>However, that's the envelope. May well _not_ be the author after passing through a
>mailing
>list or gateway. If you want the "From:" line:
>
> sed -n '/^[Ff][Rr][Oo][Mm]:/p'
>
>will do the trick.
That is true. But you might want to know that it is from a mail list AND
who the original sender is.
Then you might want:
sed -e '/^From[: ]/p'
That will print both lines. Looking for anything other than "From" is
a waste, because by definition the case is only as shown.
MB
--
e-mail: [EMAIL PROTECTED] It is God's job to forgive bin Laden.
It is our job to set up the meeting.
U.S. Marine Corp.
Visit - URL: http://www.vidiot.com/ (Your link to Star Trek and UPN)
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list