<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: checking the input in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/checking-the-input/m-p/3077039#M141871</link>
    <description>Instead of "if ... else" how about "case". Case can do selection based on simple regular expressions (filename expansion *?[])&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;mydate="01-02-03"&lt;BR /&gt;valid=0&lt;BR /&gt;case $mydate in&lt;BR /&gt;[0-1][0-9][-/][0-3][0-9][-/][0-9][0-9]) valid=1;;&lt;BR /&gt;esac&lt;BR /&gt;if [ "$valid" ] ; then&lt;BR /&gt; echo "good date"&lt;BR /&gt;else&lt;BR /&gt; echo "bad date"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills&lt;BR /&gt;</description>
    <pubDate>Wed, 24 Sep 2003 10:25:21 GMT</pubDate>
    <dc:creator>Rodney Hills</dc:creator>
    <dc:date>2003-09-24T10:25:21Z</dc:date>
    <item>
      <title>checking the input</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/checking-the-input/m-p/3077038#M141870</link>
      <description>Hi, &lt;BR /&gt;I  am taking a input date ( in the format mm/dd/yy or mm-dd-yy from the keyborad).Now i have written a pattern to match the same which is as follows&lt;BR /&gt;&lt;BR /&gt;[0-1][0-9][-/][0-3][0-9][-/][0-9][0-9]&lt;BR /&gt;&lt;BR /&gt;Now i want to compare that whatever is entered from keyboard is compying to the pattern given below. Any ideas how it can be done using if .....else.</description>
      <pubDate>Wed, 24 Sep 2003 02:23:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/checking-the-input/m-p/3077038#M141870</guid>
      <dc:creator>mahesh_24</dc:creator>
      <dc:date>2003-09-24T02:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: checking the input</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/checking-the-input/m-p/3077039#M141871</link>
      <description>Instead of "if ... else" how about "case". Case can do selection based on simple regular expressions (filename expansion *?[])&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;mydate="01-02-03"&lt;BR /&gt;valid=0&lt;BR /&gt;case $mydate in&lt;BR /&gt;[0-1][0-9][-/][0-3][0-9][-/][0-9][0-9]) valid=1;;&lt;BR /&gt;esac&lt;BR /&gt;if [ "$valid" ] ; then&lt;BR /&gt; echo "good date"&lt;BR /&gt;else&lt;BR /&gt; echo "bad date"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Sep 2003 10:25:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/checking-the-input/m-p/3077039#M141871</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2003-09-24T10:25:21Z</dc:date>
    </item>
  </channel>
</rss>

