TIP: Click on subject to list as thread! ANSI
echo: bbbs.english
to: ALL
from: JANIS KRACHT
date: 2017-01-28 21:08:00
subject: Problems with a script...

oops correction... ithaca is created, but shortith is not..

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  /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)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.