<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Although I started with Korn and Bourne
      shells instead of PERL, I agree with Keith about PHP.<br>
      <br>
      PHP is easy to learn, especially if you already know "C" - many of
      the fundamental I/O calls are based  on the <br>
      standard "C" language defined in P.J. Plauger's book.  <br>
      <br>
       Jon Kettenhofen<br>
      <a class="moz-txt-link-abbreviated" href="mailto:subs@kexsof.com">subs@kexsof.com</a><br>
      On 06/24/2013 10:43 AM, keith smith wrote:<br>
    </div>
    <blockquote
cite="mid:1372085009.11982.YahooMailClassic@web161201.mail.bf1.yahoo.com"
      type="cite">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody>
          <tr>
            <td style="font: inherit;" valign="top"><br>
              <br>
              About 13 years ago I taught myself PERL using
              <a class="moz-txt-link-freetext" href="http://www.cgi101.com/">http://www.cgi101.com/</a>  I left PERL for PHP several years
              later.<br>
              <br>
              When choosing a language you may want to consider several
              things.<br>
              <br>
              1) Is that language readily available with the major
              virtual hosting companies like GoDaddy and HostGator.<br>
              <br>
              2) What would you like to do with the language beyond the
              current project.  If you use WordPress, Joomla, Drupal...
              or any number of open sources browser based apps that are
              written in PHP, you may consider PHP over PERL.  If you
              want to do server automation you may what PERL, or maybe
              that does not matter much any longer and PHP is just as
              strong.<br>
              <br>
              PHP is not that hard to learn, nor is MySql.  Google is
              your friend.<br>
              <br>
              I began to learn PHP by creating a simple connection
              string, selecting a database and then hard coded queries
              to Create, Read, Update, Delete, (CRUD) and finally a
              list.  I expanded from there.  You need to know a little
              HTML and CCS, which I think you already know.  <br>
              <br>
              The beauty of going this route is you can build browser
              based apps that will run anyplace there is a browser, that
              means M$, Linux, ALL smart phones (not just the ones that
              run your app), AND Apple.<br>
              <br>
              And PHP / MySql is everywhere.  <br>
              <br>
              Throw in a little jQuery and you could create some really
              awesome apps.<br>
              <br>
              Might open up a whole new world for you.<br>
              <br>
              <br>
              ------------------------<br>
              Keith Smith<br>
              <br>
              --- On <b>Sun, 6/23/13, George Toft <i><a class="moz-txt-link-rfc2396E" href="mailto:george@georgetoft.com"><george@georgetoft.com></a></i></b>
              wrote:<br>
              <blockquote style="border-left: 2px solid rgb(16, 16,
                255); margin-left: 5px; padding-left: 5px;"><br>
                From: George Toft <a class="moz-txt-link-rfc2396E" href="mailto:george@georgetoft.com"><george@georgetoft.com></a><br>
                Subject: Re: OT: How to embed or call a shell script in
                an html file?<br>
                To: "Main PLUG discussion list"
                <a class="moz-txt-link-rfc2396E" href="mailto:plug-discuss@lists.phxlinux.org"><plug-discuss@lists.phxlinux.org></a><br>
                Date: Sunday, June 23, 2013, 10:28 PM<br>
                <br>
                <div class="plainMail">Several years ago I did a test:
                  perl versus bash cgi scripts.  perl was <br>
                  about 5,000 times faster than bash.<br>
                  <br>
                  Learning Perl isn't that hard - get "Teach Yourself
                  Perl 5 in 21 Days" <br>
                  and you'll be ok.<br>
                  <br>
                  Regards,<br>
                  <br>
                  George Toft<br>
                  <br>
                  On 6/23/2013 7:45 AM, Matt Graham wrote:<br>
                  > From: joe@<br>
                  >> Now, my follow-up question is, how can I
                  integrate this shell script<br>
                  >> into an html file as I hope to be able to use
                  it in a web page?<br>
                  > This is *not* a good idea.  Creating dynamic web
                  pages with shell can be done,<br>
                  > but it's not one of the things that shell is
                  designed for/good at.  One way is<br>
                  > briefly described at <a moz-do-not-send="true"
                    href="http://httpd.apache.org/docs/2.2/howto/ssi.html"
                    target="_blank">http://httpd.apache.org/docs/2.2/howto/ssi.html</a>
                  .  You<br>
                  > will have an easier time of it if you use
                  something that's designed for<br>
                  > creating dynamic web pages, like mod_python or
                  CGI-Perl or Ruby on Rails or<br>
                  > PHP.<br>
                  ><br>
                  >> #!/bin/bash - This shell script that I have
                  named "qsearch" now works.<br>
                  >><br>
                  >> while (:) do<br>
                  >> echo -e "Press S to search >>> \c";
                  ans=`readin`; echo; case $ans in<br>
                  >>    [sS]) echo -e "Find what word? \c";read
                  name1<br>
                  >>          echo -e "and what second word?
                  \c";read name2<br>
                  >>          fgrep -y "$name1" q-hid | fgrep -y
                  "$name2" > tempz<br>
                  >>          cls; echo -e "\nSearch word(s):
                  $name1 $name2";<br>
                  >>          echo "Here are the first 10 results
                  found:"; echo<br>
                  >>          head -10 tempz; echo;;<br>
                  >>    [qQ]) cls; echo; exit;;<br>
                  >>    *) cls; echo "Not a valid option."; echo;;
                  esac done<br>
                  >> esac<br>
                  >> done<br>
                  > How is this working?  If I paste the above into
                  temp.sh and execute it, it<br>
                  > says "/bin/bash: - : invalid option".  If I fix
                  the interpreter line so it<br>
                  > says "#!/bin/bash" , it complains that readin and
                  cls are not valid bash<br>
                  > commands.  If I replace "ans=`readin`" with "read
                  ans" and "cls" with "clear",<br>
                  > it fails with a syntax error because "esac done"
                  is in there twice.<br>
                  ><br>
                  <br>
                  ---------------------------------------------------<br>
                  PLUG-discuss mailing list - <a moz-do-not-send="true"
                    ymailto="mailto:PLUG-discuss@lists.phxlinux.org"
                    href="/mc/compose?to=PLUG-discuss@lists.phxlinux.org">PLUG-discuss@lists.phxlinux.org</a><br>
                  To subscribe, unsubscribe, or to change your mail
                  settings:<br>
                  <a moz-do-not-send="true"
                    href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss"
                    target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
                </div>
              </blockquote>
            </td>
          </tr>
        </tbody>
      </table>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">---------------------------------------------------
PLUG-discuss mailing list - <a class="moz-txt-link-abbreviated" href="mailto:PLUG-discuss@lists.phxlinux.org">PLUG-discuss@lists.phxlinux.org</a>
To subscribe, unsubscribe, or to change your mail settings:
<a class="moz-txt-link-freetext" href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></pre>
    </blockquote>
    <br>
  </body>
</html>