I tried to execute script within C program. I tried:
system("/home/olaudix/weather.sh")
system("sh /home/olaudix/weather.sh")
execvp("/home/olaudix/weather.sh")
but all of them throw
syntax error: "(" unexpected at line 1.
Scripts starts with function getData() { but it runs fine when executed in terminal.
sh -c#!line. Also, if you want to be compatible with sh, it should begetData() {(withoutfunction).