Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been reading and searching on what is the best way to run my shell scripts through a website.

My goals are as follows:

  • Browse a folder
  • Select folder or contents
  • onclick will run script
  • Files will be modified and output results inside a .txt file

I have searched mostly for CGI but I know there maybe other alternatives. Also, I am using a Linux hosting server from a 3rd party company.

I did run across these helpful sites for others to read: CGI Security & YoLinux

share|improve this question
up vote 2 down vote accepted

shbot is a very nice IRC bot used for the #bash Freenode channel. You can ask it to run Bash code for you:

/privmsg shbot echo test

It should be relatively easy to adapt this to work with a static web page.

share|improve this answer

I would not recommend you to do such thing, but if I really needed it I would, probably, modify mod_autoindex to generate special links for *.sh files, pointing to CGI script which does the job.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.