Contents
How do I run a shell script from HTML?
Step 2: Put your HTML page in DocumentRoot directory. Step 3: Go Ahead and test in browser. Click on Link and you will see that shell script is executed and result is displayed on web page. Similarly, click on HTML button and you will see that shell script output is displayed on web page.
How do I run a terminal command from a website?
Executing Linux / UNIX commands from web page
- #!/bin/bash : First line tell Linux/UNIX how file first. cgi should be run. …
- echo “Content-type: text/html” : Send html headers, you must include this line.
- echo “” : Send a blank line, you must include this line.