.forward | awk > file 
Author Message
 .forward | awk > file

Hello,
I'm working on some hompages for our staff. On those pages we would like
to have a little message which we change about every day, like

"Today I'll be in a meeting between 12.00 and 14.00"

To do this in a simple i think sending a mail to me is the best way.
They are on a NT plattform and the http server is on UNIX. So I want to
send the mail to a UNIX script in my .forward like "| filter" in the
first line. I want it to

1. take the line subject: !#<user> and just the username

2. open  file /path/<user>.htm

3. Make a replace in the file

eg of the HTML file
-----------------------------------------------------------
<HTML>
<BODY>
some text...
<!-- USER MSG BEGIN -->
"Old message"
<!-- USER MSG END -->
some more text....
</BODY>
</HTML>
-----------------------------------------------------------

EX. of an mail that will be |'ed to my script
-----------------------------------------------------------

Quote:
>From xxxxxxxxx  Tue Jun 25 15:34:49 1996Received: from edt02.ericsson.se (edt02.ericsson.se [136.225.9.4]) by

pop.gsm.eric
sson.se (8.6.12/8.6.12) with ESMTP id PAA03527; Tue, 25 Jun 1996
15:34:48 +0200
From: xxxxxxxxxx
Received: from pc-mail.ericsson.se by edt.ericsson.se (PMDF V5.0-6
#16175)

+0200
Received: by pc-mail.ericsson.se via MsMail with Mimetic; Tue,
 25 Jun 1996 15:36 +0200
Date: Tue, 25 Jun 1996 15:33 +0200
Subject: !#erarlan  
To: xxxxxxxxxxx
Cc:

MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: quoted-printable
                                        //After first blank line comes  
Please take a look at the LK/AD Web at  //the message
file:///L|/LK/LKAC/LKAD/WWW/INDEX.HTM

it will go online next week.

Comments to Simon or me
xxx
-------------------------------------------------------------------

My problem is I don't know how to take just the username not even with
grep. If I do it that way the message will be lost from the streem and I
have to save it in a file :(
Then there is the replacement, which should be realy easy. I think sed
could do it. Sure awk too, still I don't know how. Can anybody help me?
I am sorry for my lack of knowledge in UNIX (I'm working on it).

Please mail me al sugestions on a UNIX sullosion

--
Simon Zeeck



Sun, 20 Dec 1998 03:00:00 GMT  
 .forward | awk > file



| Hello,
| I'm working on some hompages for our staff. On those pages we would like
| to have a little message which we change about every day, like
|
| "Today I'll be in a meeting between 12.00 and 14.00"
|
| To do this in a simple i think sending a mail to me is the best way.
| They are on a NT plattform and the http server is on UNIX. So I want to
| send the mail to a UNIX script in my .forward like "| filter" in the
| first line. I want it to

My I highly commend the 'procmail' package, which can be used to
edit all your mail in whatever way you want, allow you to file it,
remail it, filter it, etc.

When there's a ready made tool I use it.
--

Stupidity, like virtue, is its own reward.



Sat, 26 Dec 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. .cob files >>> .exe files

2. >>>>>How to read a IMAGE file?(BMP, GIF)|||||||||

3. Outputting info from awk and using the info to name the awk output file

4. >>>ARGHH>>>got 2-100,one line email names,which way to produce a 3rd list of Uniq, diff or awk-sed

5. Q: simple example of read file->convert char(s)->write file needed

6. PLAY,REWIND,FORWARD,PAUSE ....a WAV File ????

7. HELP>>>>>>>Fortran-Pascal Linking

8. forwarding to end-of-file

9. Forward Whole Mail File

10. >>>>>>>FROM SMTK TO C++

11. ><><><><>Heeeeeeeeeeeeeeelp on INT 14!><><><><><>

12. <<<<<YOU MUST CHECK THIS OUT >>>>>>>>>> 2103

 

 
Powered by phpBB® Forum Software