home bbs files messages ]

Just a sample of the Echomail archive

Cooperative anarchy at its finest, still active today. Darkrealms is the Zone 1 Hub.

   BBBS.ENGLISH      The International BBBS Support Echo      2,762 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,737 of 2,762   
   Janis Kracht to All   
   Problems with a script...   
   28 Jan 17 20:52:00   
   
   I'm trying to get a weather report on the bbs.   
      
   Right now I'm just trying to get Ithaca's weather, from there I'll be able to   
   allow people to enter their city to get their weather... but my script keeps   
   failing.   
      
   ===getweth.bz===   
   int main() {   
   char g;   
   char x;   
   char i;   
   g=system(sprintf("/usr/bin/curl wttr.in/ithaca -O"),1,0);   
   //the above line creates file named ithaca that contains the weather report   
   x=system(sprintf("awk '$2 !~ /^sa/ && $1 < 8' ithaca > /home/bbbs/shortith"),1,   
    0);   
   //the above line chops off what I need, just the top 7 lines.   
   i=system(sprintf("/home/bbbs/shortith"),1,0);   
   return(i);   
   //sprintf is supposed to show that shortened weather report (but it doesn't).   
   }   
   ====end getweth.bz=====   
      
   What I see when I run the door, is a blank 8 lines... argh.. and the files   
   ithaca and shorthith aren't created so of course bbbs can't show them :(   
      
   Rudi, I'm sure I'm doing something dumb here :) Any help appreciated :)   
      
   Take care,   
   Janis   
      
   --- BBBS/Li6 v4.10 Toy-3   
    * Origin: Prism bbs (1:261/38)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca