Someone
public text v1 · immutable#include <unistd.h>
#include <string.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
char *cmd;
cmd = strtok(argv[1], ";");
while (cmd != NULL)
{
pid_t pid = fork();
int status;
if (pid == 0)
{
printf("%s\n", cmd);
execlp(cmd, cmd, (char *)NULL);
}
/* if (pid > 0)
wait(&status); */
cmd = strtok(NULL, ";");
}
return 0;
}