SID-00219: How to call a custom perl script using forms in Twiki
| Status: |
Answered |
TWiki version: |
4.2.3 |
Perl version: |
5.8.4 |
| Category: |
CategoryForms |
Server OS: |
Debian Linux |
Last update: |
16 years ago |
Hi, I am planing to include a page in twiki which can call a custom perl or shell script in server using forms in Twiki. The example could be some thing like there will be a text box where user can enter a text(say name of the person) and a drop down box for the user to select a command (say date or pwd). When the user clicks on the submit button a small browser window must appear showing the text entered by user and the out put of the command selected. we will be working on different linux and solaris machines at our work place. It will be great if we can integrate the monitoring activity on this servers in Twiki

The out put of Linux commands like pwd date etc would be of great help
Below is the example of the script I would like to call from twiki
#!/bin/ksh
DATESTR="$(/bin/date)"
echo "<head></head><body>"days Date
echo "Today is ${DATESTR}"
echo "</body>"
--
RaghuKiran - 25 Mar 2009
Discussion and Answer
Please see
HowToRunPerlOnDemand.
--
SeanCMorgan - 25 Mar 2009
You can embed an HTML form in a page and point the form action to a script that you have on your server. Here is an example. TWiki.org has a tzdate script that shows the current time in cities around the world.
View the raw text to see how this works. You can use some HTML to pop up a new window of some size. Study HTML docs on how to do that.
--
PeterThoeny - 25 Mar 2009
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.