> Hi Tony,   
   >> sorry if I ask too much but is a sort of doc add-on :-) How can I do the new   
   >> files announcements in the correct are using some script?   
   >The way I do it is kind of involved, using 3 scripts. Maybe Kim will have som   
   > easier way to do this that I didn't think of at the time. I wrote these   
   > scripts a long time ago, and they work for me    
   > I use these scripts to grab the new file announcements from   
   >/home/bbbs/work/tickinfo.txt, and copy it to a message area and post it, and I   
   > also copy the info to my web page's "new files" section.   
   > Script one is called 'parsefile':   
   > ===start parsefile===   
   > #!/bin/sh   
   > cd /home/bbbs/test   
   > if test -e /home/bbbs/work/tickinfo.txt ; then   
   > echo "File Exists"   
   > cp /home/bbbs/work/tickinfo.txt /home/bbbs/test   
   > cat tickinfo.txt | sed 's/Area/\   
   > Area/' > test.txt   
   > cat test.txt | sed 's/Origin/\   
   > Origin/' > test2.txt   
   > cat test2.txt /home/bbbs/htdocs/tickinfo.txt > new.txt   
   > cp new.txt /home/bbbs/test/newtick.txt   
   > cp new.txt /home/bbbs/htdocs/tickinfo.txt   
   > cp test2.txt /home/bbbs/work/tickinfo.txt   
   > cd /home/bbbs   
   > ./shareware.rpt   
   > else   
   > echo "no file to process"   
   > fi   
   > cd /home/bbbs/bin   
   > sudo ./cpticinfo   
   > cd /home/bbbs   
   > ===end parsefile===   
   > As you can see, parsefile is the master script, calling shareware.rpt and   
   > cpticinfo.   
   > ===shareware.rpt===   
   > cd /home/bbbs   
   > rm File_Announce_*   
   > mv -f work/tickinfo.txt /home/bbs/oldlist.txt split -l 24 oldlist.txt   
   > File_Announce_ chmod 700 File_Announce*   
   > dir -1 File_Announce* > msglst   
   > for file in `cat msglst`   
   > do   
   >./bbbs btxt2bbs fido.shareware_support $file /f The IFDC FileGate /t All /s Ne   
   > file Arrival   
   > sleep 5   
   > done   
   > ./bbbs bogus f echotoss.log   
   > ===   
   > ===cpticinfo===   
   > #!/bin/sh   
   > cd /home/bbbs/htdocs   
   > if test /home/bbbs/htdocs/tickinfo.txt -nt /var/www/tickinfo.txt ; then   
   > cp /home/bbbs/htdocs/tickinfo.txt /var/www/tickinfo.txt   
   > fi   
   > ===   
   > This is a file that I keep in my bbbs directory since cpticinfo needs it:   
   > ===echotoss.log===   
   > fido.SHAREWARE_SUPPORT   
   > === end echotoss.log==   
   > SHAREWARE_SUPPORT is the echo I post the announcements in.   
   >Hope this helps.. If I had to write this whole thing again today, I'd probably   
   > faint LOL   
   > Take care,   
   > Janis   
      
   Thank you Janis.   
      
   Tony   
      
   --- BBBS/Li6 v4.10 Toy-3   
    * Origin: = Friends BBS = London = bbs.tonyuk.online:2424 = (2:250/5)   
|