<?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: Regular Expression Question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/regular-expression-question/m-p/3052692#M136902</link>
    <description>Hi,&lt;BR /&gt;Try (in ksh):&lt;BR /&gt;ls -l ?(FULL|INC)BACKUP.log</description>
    <pubDate>Wed, 20 Aug 2003 10:23:07 GMT</pubDate>
    <dc:creator>Leif Halvarsson_2</dc:creator>
    <dc:date>2003-08-20T10:23:07Z</dc:date>
    <item>
      <title>Regular Expression Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regular-expression-question/m-p/3052689#M136899</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I've got a rather large shell script written in ksh, but I need to make a small modification to pick up a regular expression.&lt;BR /&gt;&lt;BR /&gt;The requirement is to match either wordA or wordB in an "ls" command, but the expression that works in Posix, doesn't seem to work in ksh.&lt;BR /&gt;&lt;BR /&gt;The Posix expression is:-&lt;BR /&gt;&lt;BR /&gt;$ ls -l {FULL,INCR}BACKUP.log&lt;BR /&gt;&lt;BR /&gt;Does anyone know an equiv. for ksh ???&lt;BR /&gt;&lt;BR /&gt;(Thanks in advance for any/all help!!)&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Paul.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Aug 2003 09:40:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regular-expression-question/m-p/3052689#M136899</guid>
      <dc:creator>Paul Murray_4</dc:creator>
      <dc:date>2003-08-20T09:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regular-expression-question/m-p/3052690#M136900</link>
      <description>Paul,&lt;BR /&gt;&lt;BR /&gt;I'm not known for my shell scripting, so take this with a grain of salt:&lt;BR /&gt;&lt;BR /&gt;How about:&lt;BR /&gt;&lt;BR /&gt;ls -l [FI][UN][LC][LR]BACKUP.log&lt;BR /&gt;&lt;BR /&gt;?&lt;BR /&gt;&lt;BR /&gt;Does that give you what you want?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Aug 2003 10:09:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regular-expression-question/m-p/3052690#M136900</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-08-20T10:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regular-expression-question/m-p/3052691#M136901</link>
      <description>Paul,&lt;BR /&gt;&lt;BR /&gt;why not use grep?&lt;BR /&gt;&lt;BR /&gt;ls -l | grep -e 'BACKUP.log$' -e 'FULL|INCR'&lt;BR /&gt;&lt;BR /&gt;(not *exactly* yours but maybe you like this  better:&lt;BR /&gt;&lt;BR /&gt;ls -l *BACKUP.log | grep -e 'FULL|INCR'&lt;BR /&gt;&lt;BR /&gt;or really exact and only:&lt;BR /&gt;ls -l | grep -e FULLBACKUP.log -e INCRBACKUP.log&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Bernhard&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Aug 2003 10:12:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regular-expression-question/m-p/3052691#M136901</guid>
      <dc:creator>Bernhard Mueller</dc:creator>
      <dc:date>2003-08-20T10:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regular-expression-question/m-p/3052692#M136902</link>
      <description>Hi,&lt;BR /&gt;Try (in ksh):&lt;BR /&gt;ls -l ?(FULL|INC)BACKUP.log</description>
      <pubDate>Wed, 20 Aug 2003 10:23:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regular-expression-question/m-p/3052692#M136902</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2003-08-20T10:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regular-expression-question/m-p/3052693#M136903</link>
      <description>Hi Paul:&lt;BR /&gt;&lt;BR /&gt;Leif's suggestion works.&lt;BR /&gt;&lt;BR /&gt;Here are two other alternatives, too:&lt;BR /&gt;&lt;BR /&gt;(1) Use the standard Posix shell ('/usr/bin/sh').  It is really a superset of the Korn (ksh88) shell as provided with HP-UX.&lt;BR /&gt;&lt;BR /&gt;(2) Instead of the 1988 version of Korn, use the 1993 version.  You should find it as '/usr/dt/bin/dtksh'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 20 Aug 2003 10:44:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regular-expression-question/m-p/3052693#M136903</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-08-20T10:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regular-expression-question/m-p/3052694#M136904</link>
      <description>call the posix shell for this part only :&lt;BR /&gt;&lt;BR /&gt;....&lt;BR /&gt;/usr/bin/sh "ls -l {FULL,INCR}BACKUP.log"&lt;BR /&gt;....&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;JL</description>
      <pubDate>Wed, 20 Aug 2003 10:47:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regular-expression-question/m-p/3052694#M136904</guid>
      <dc:creator>Jean-Luc Oudart</dc:creator>
      <dc:date>2003-08-20T10:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Regular Expression Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regular-expression-question/m-p/3052695#M136905</link>
      <description>Thanks to all for your help (points have been awarded !!).&lt;BR /&gt;&lt;BR /&gt;Leif's answer has provided exactly what I needed - many thanks !!!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Aug 2003 10:50:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regular-expression-question/m-p/3052695#M136905</guid>
      <dc:creator>Paul Murray_4</dc:creator>
      <dc:date>2003-08-20T10:50:26Z</dc:date>
    </item>
  </channel>
</rss>

