I want to know if there is any way to use Bash(Shell Script) to make web pages, like Perl, C++ and others through CGI. And if there is any way, where I can find a good free hosting for it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is definitely possible, and just about any Linux-based (or BSD-based, I guess) shared hosting would be able to do it. I’ve done it for little test pages etc on my cheap 1&1 account.
On my host, I just call a file “foo.cgi”, and I put the
#!/bin/shline at the top. Works fine. Of course, it’s kind-of a mess for anything complicated.Obviously a real script could do other stuff. HTTP info is generally in environment variables, but I can’t clearly recall exactly how that works and it might vary depending on the web server involved.