Reputation: 1
It is my first time with Linux, and I need to use this
execlp("/usr/bin/wget", "wget", <URL STRING1>, NULL) system call in C++ code,
I cannot find anywhere how it should be written in C++, need some help.
Thank you!
Upvotes: 0
Views: 2181
Reputation: 26910
Include the unistd.h
#include <unistd.h>
int main() {
execlp("/usr/bin/wget", "wget", "http://www.google.com", NULL);
return 0;
}
Upvotes: 1
Reputation: 47034
execl("/usr/bin/wget","wget","http://stackoverflow.com/",NULL);
should do the job.
Upvotes: 1