I am trying to pass the argument to my bash script through my cgi script. This may sound a little bit confusing, so here is the explanation,
I have bash script called script.sh which accept one argument lets say name
so I execute this script like this,
bash script.sh myName
The name is then written in a text file, and then i can read it from that text file.
Which works just fine, but I want to be able to execute this same command through cgi, so I did this inside my cgi file,
`/bin/echo "bash script.sh myName"`;
Now I execute this cgi script through my webserver like this,
http://localhost/index.cgi
but myName is not passing as an argument to my bash script and hence nothing is written on the text file.
Can anyone please tell me why its not working when I am running through cgi script but working fine when run without a cgi script ?
EDIT: I have also tried using exec() but the argument still wouldn't pass.
#!/bin/cshso its C-shell