在CGI bash脚本中提取URL文件名

时间:2017-08-24 10:44:45

标签: bash

我有两个CGI文件:

script1.sh:

#!/bin/bash
echo "Content-type: text/html"
echo ""
echo "<html>"
echo "<body>"
echo "<form action="/cgi-bin/gene-to-structure/NM_002014-
NP_002005.1/script5.sh" method="GET">"
echo "<p><input type="checkbox" name="residue" value="V---M">                  
<br></p>"
echo "<p><input type="checkbox" name="residue" value="K---N">                   
<br></p>"
echo "<input type="submit" value="Submit">"
echo "</form>"
echo "</body>"
echo "</html>"

在上面的单击“提交”按钮的脚本中,我被带到“script5.sh”CGI脚本。我想检索文件的“文件名”(script1.sh),点击“提交”按钮后,我来到“script5.sh”。你能告诉我怎么做吗?

所以,我想在“script5.sh”中执行此操作:

Script5.sh

#!/bin/bash
echo "Content-type: text/html"
echo ""

echo "The file name of the file is "script1.sh"".

非常感谢你!

0 个答案:

没有答案