OT: How to embed or call a shell script in an html file?

joe at actionline.com joe at actionline.com
Sat Jun 22 23:14:13 MST 2013


Thanks again to Rusty for providing the solution that makes the shell
script shown below now work correctly (by simply adding the "hashbang" as
the first line in the script).

Now, my follow-up question is, how can I integrate this shell script into
an html file as I hope to be able to use it in a web page?

#!/bin/bash - This shell script that I have named "qsearch" now works.

while (:) do
echo -e "Press S to search >>> \c"; ans=`readin`; echo; case $ans in
  [sS]) echo -e "Find what word? \c";read name1
        echo -e "and what second word? \c";read name2
        fgrep -y "$name1" q-hid | fgrep -y "$name2" > tempz
        cls; echo -e "\nSearch word(s): $name1 $name2";
        echo "Here are the first 10 results found:"; echo
        head -10 tempz; echo;;
  [qQ]) cls; echo; exit;;
  *) cls; echo "Not a valid option."; echo;; esac done
esac
done





More information about the PLUG-discuss mailing list