<?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: Problem with wilcards in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587740#M827205</link>
    <description>Sorry:&lt;BR /&gt;&lt;BR /&gt;file1.(any day)MMYY(any SIX numbers)&lt;BR /&gt;&lt;BR /&gt;Regards,</description>
    <pubDate>Thu, 21 Jul 2005 07:25:46 GMT</pubDate>
    <dc:creator>R.O.</dc:creator>
    <dc:date>2005-07-21T07:25:46Z</dc:date>
    <item>
      <title>Problem with wilcards</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587739#M827204</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am trying to mach files named like this:&lt;BR /&gt;&lt;BR /&gt;file1.200705152407&lt;BR /&gt;&lt;BR /&gt;where the digits 200705 are day, month and year.&lt;BR /&gt;I want to list all the files that matches the pattern:&lt;BR /&gt;&lt;BR /&gt;file1.(any day)MMYY(any five numbers)&lt;BR /&gt;&lt;BR /&gt;How can I do it? I tried with *, ?, but i does not work.&lt;BR /&gt;&lt;BR /&gt;Regards,</description>
      <pubDate>Thu, 21 Jul 2005 07:24:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587739#M827204</guid>
      <dc:creator>R.O.</dc:creator>
      <dc:date>2005-07-21T07:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with wilcards</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587740#M827205</link>
      <description>Sorry:&lt;BR /&gt;&lt;BR /&gt;file1.(any day)MMYY(any SIX numbers)&lt;BR /&gt;&lt;BR /&gt;Regards,</description>
      <pubDate>Thu, 21 Jul 2005 07:25:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587740#M827205</guid>
      <dc:creator>R.O.</dc:creator>
      <dc:date>2005-07-21T07:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with wilcards</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587741#M827206</link>
      <description>Why does ? not work?  I tested it with some test files: -&lt;BR /&gt;&lt;BR /&gt;# ls -1&lt;BR /&gt;file1.010203123451&lt;BR /&gt;file1.020203123441&lt;BR /&gt;file1.020203123451&lt;BR /&gt;file1.020303123451&lt;BR /&gt;# ls file1.??0203??????&lt;BR /&gt;file1.010203123451&lt;BR /&gt;file1.020203123441&lt;BR /&gt;file1.020203123451&lt;BR /&gt;&lt;BR /&gt;This displays all the files from 0203.  Is this not what you want?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 21 Jul 2005 07:36:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587741#M827206</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2005-07-21T07:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with wilcards</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587742#M827207</link>
      <description>You can use "[0-9]" to represent any single digit; multiple "[0-9]"'s can be strung together.&lt;BR /&gt;&lt;BR /&gt;Often it's actually easier to simply punt and do an ls (of everything, or ls file1*) and pipe to enhanced grep for more serious regular expression evaluation:&lt;BR /&gt;&lt;BR /&gt;ls | grep -E -e '^file1\.[0-9]{12}$'&lt;BR /&gt;&lt;BR /&gt;which would list file1.followed by exactly 12 digits which seems to be a simpler statement of your problem.&lt;BR /&gt;</description>
      <pubDate>Thu, 21 Jul 2005 07:43:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587742#M827207</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-07-21T07:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with wilcards</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587743#M827208</link>
      <description>Clay is correct. You can use the wildcard "*" character to specify the preceding range of character(s) you want to match. The following command will list all the files:&lt;BR /&gt;&lt;BR /&gt;# ls -1 file1.[0-9]*&lt;BR /&gt;&lt;BR /&gt;cheers!</description>
      <pubDate>Thu, 21 Jul 2005 08:58:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587743#M827208</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2005-07-21T08:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with wilcards</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587744#M827209</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Thank you for your responses!!! It happens in a script. If I put in the script:&lt;BR /&gt;&lt;BR /&gt;file1.*${MONTH}${YEAR}*&lt;BR /&gt;&lt;BR /&gt;... it works; but if I put &lt;BR /&gt;     &lt;BR /&gt;file1.??${MONTH}${YEAR}??????&lt;BR /&gt;&lt;BR /&gt;....it does not works:&lt;BR /&gt;&lt;BR /&gt;file1.??0605?????? not found&lt;BR /&gt;&lt;BR /&gt;What is wrong?&lt;BR /&gt;&lt;BR /&gt;Regards,</description>
      <pubDate>Fri, 22 Jul 2005 00:59:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587744#M827209</guid>
      <dc:creator>R.O.</dc:creator>
      <dc:date>2005-07-22T00:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with wilcards</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587745#M827210</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;you said:&lt;BR /&gt;file1.(any day)MMYY(any five numbers)&lt;BR /&gt;&lt;BR /&gt;but you made six '?' at the end:&lt;BR /&gt;file1.??${MONTH}${YEAR}??????&lt;BR /&gt;&lt;BR /&gt;That can't work!&lt;BR /&gt;You have to make exactly as much '?' as numbers you search.&lt;BR /&gt;So with 5 '?' it should work.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Volkmar&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Jul 2005 01:50:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587745#M827210</guid>
      <dc:creator>V. Nyga</dc:creator>
      <dc:date>2005-07-22T01:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with wilcards</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587746#M827211</link>
      <description>Sorry - you corrected your number in your first answer.&lt;BR /&gt;&lt;BR /&gt;Can you show us your list command?&lt;BR /&gt;&lt;BR /&gt;V.&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Jul 2005 01:57:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587746#M827211</guid>
      <dc:creator>V. Nyga</dc:creator>
      <dc:date>2005-07-22T01:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with wilcards</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587747#M827212</link>
      <description>IF your file is like,&lt;BR /&gt;&lt;BR /&gt;file1.200705&lt;SIX digit=""&gt; then,&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;#list.ksh&lt;BR /&gt;&lt;BR /&gt;# User Input&lt;BR /&gt;Month="" # two digit example 09&lt;BR /&gt;Year="" # two digit 05&lt;BR /&gt;LS=`which ls`&lt;BR /&gt;$LS file1.??${Month}${Year}?????&lt;BR /&gt;&lt;BR /&gt;exit 0&lt;BR /&gt;# end&lt;BR /&gt;&lt;BR /&gt;chmod 755 list.ksh&lt;BR /&gt;./list.ksh&lt;BR /&gt;&lt;BR /&gt;hth.&lt;/SIX&gt;</description>
      <pubDate>Fri, 22 Jul 2005 03:33:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587747#M827212</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-07-22T03:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with wilcards</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587748#M827213</link>
      <description>To elloborate more on this,&lt;BR /&gt;&lt;BR /&gt;ls command will use ? * as pattern matching not with regular expression. &lt;BR /&gt;&lt;BR /&gt; ls file1.??&amp;lt;2digit&amp;gt;&amp;lt;2digit&amp;gt;??????&lt;BR /&gt;&lt;BR /&gt; It will try to find files with pattern match of file1.two digits &amp;lt;2 digits&amp;gt;&amp;lt;2 digits&amp;gt; &amp;lt;6 digits&amp;gt; else it will try to match for,&lt;BR /&gt;&lt;BR /&gt; ls file1.??0205??????? named file which is created as touch file1.??0205??????&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Fri, 22 Jul 2005 03:40:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587748#M827213</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-07-22T03:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with wilcards</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587749#M827214</link>
      <description>That's because within the shell the "*" wildcard is treated as a metacharacter but not the "?". Either of the following two commands should list all your files:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# ls -1 file1.*${MONTH}${YEAR}*&lt;BR /&gt;&lt;BR /&gt;OR&lt;BR /&gt;&lt;BR /&gt;# ls -1 | grep -E file1.??${MONTH}${YEAR}??????&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;cheers!</description>
      <pubDate>Sat, 23 Jul 2005 07:43:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587749#M827214</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2005-07-23T07:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with wilcards</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587750#M827215</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I don't understand why your approach should not work. I tried it and it worked.&lt;BR /&gt;Can you give us more details about which shell you use and what you do with the pattern in the script?&lt;BR /&gt;&lt;BR /&gt;greetings,&lt;BR /&gt;&lt;BR /&gt;Michael</description>
      <pubDate>Sat, 23 Jul 2005 09:42:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-wilcards/m-p/3587750#M827215</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2005-07-23T09:42:14Z</dc:date>
    </item>
  </channel>
</rss>

