Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

2 Answers 2

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
add comment

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
add comment

Your Answer

 
discard

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.