<?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: strange behavior? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-behavior/m-p/3031918#M906243</link>
    <description>Hi&lt;BR /&gt;&lt;BR /&gt;Well I have seen differing results between 2 similar servers&lt;BR /&gt;&lt;BR /&gt;1st result was vice versa to yours but ok in my ~dir and / apart from &lt;BR /&gt;&lt;BR /&gt;echo $T | grep [1-9]&lt;BR /&gt;&lt;BR /&gt;Didn;t return enything&lt;BR /&gt;&lt;BR /&gt;PHCO_22712                    1.0            ksh(1) cumulative patch&lt;BR /&gt;&lt;BR /&gt;On March QP machine different again&lt;BR /&gt;&lt;BR /&gt;OK in ~dir and in / but also get return from all perms of grep&lt;BR /&gt;&lt;BR /&gt;QPK1100               B.11.00.60.4   Quality Pack for HP-UX 11.00, March 2003&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hmmm&lt;BR /&gt;&lt;BR /&gt;Steve</description>
    <pubDate>Thu, 24 Jul 2003 03:29:10 GMT</pubDate>
    <dc:creator>steven Burgess_2</dc:creator>
    <dc:date>2003-07-24T03:29:10Z</dc:date>
    <item>
      <title>strange behavior?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-behavior/m-p/3031916#M906241</link>
      <description>A user encountered the following through the use of one of his scripts. But he presented the problem as follows:&lt;BR /&gt;as yourself and in your homedir, &lt;BR /&gt;export T=9    # the T is arbitrary&lt;BR /&gt;echo $T       # should return 9&lt;BR /&gt;echo $T | grep [0-9]   # should still return 9&lt;BR /&gt;cd /                   &lt;BR /&gt;echo $T | grep [0-9]   # returns nothing and echo $? is 1&lt;BR /&gt;echo $T | grep [1-9]   # returns nothing as well&lt;BR /&gt;echo $T | grep [2-9]   # returns a 9&lt;BR /&gt;&lt;BR /&gt;Root is the only place I have seen the grep fail. Why? Put quotes around the brackets and your fine. This doesn't sound normal....&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This is an HP 11.0 system. The shell is KSH (altho I have seen this with CSH)&lt;BR /&gt;On this system, the version of ksh is 82.10.1.61 (PHCO_27418)&lt;BR /&gt;I have not seen this problem on systems without this version of ksh. But I have one system with this version of ksh which works 'as expected'. &lt;BR /&gt;&lt;BR /&gt;thanks!</description>
      <pubDate>Thu, 24 Jul 2003 03:15:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-behavior/m-p/3031916#M906241</guid>
      <dc:creator>donald thompson_2</dc:creator>
      <dc:date>2003-07-24T03:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: strange behavior?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-behavior/m-p/3031917#M906242</link>
      <description>Could you please try this:&lt;BR /&gt;&lt;BR /&gt;# echo $SHELL&lt;BR /&gt;# which sh&lt;BR /&gt;# which ksh&lt;BR /&gt;# /usr/bin/sh &amp;lt;script&amp;gt;</description>
      <pubDate>Thu, 24 Jul 2003 03:27:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-behavior/m-p/3031917#M906242</guid>
      <dc:creator>twang</dc:creator>
      <dc:date>2003-07-24T03:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: strange behavior?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-behavior/m-p/3031918#M906243</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Well I have seen differing results between 2 similar servers&lt;BR /&gt;&lt;BR /&gt;1st result was vice versa to yours but ok in my ~dir and / apart from &lt;BR /&gt;&lt;BR /&gt;echo $T | grep [1-9]&lt;BR /&gt;&lt;BR /&gt;Didn;t return enything&lt;BR /&gt;&lt;BR /&gt;PHCO_22712                    1.0            ksh(1) cumulative patch&lt;BR /&gt;&lt;BR /&gt;On March QP machine different again&lt;BR /&gt;&lt;BR /&gt;OK in ~dir and in / but also get return from all perms of grep&lt;BR /&gt;&lt;BR /&gt;QPK1100               B.11.00.60.4   Quality Pack for HP-UX 11.00, March 2003&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hmmm&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Thu, 24 Jul 2003 03:29:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-behavior/m-p/3031918#M906243</guid>
      <dc:creator>steven Burgess_2</dc:creator>
      <dc:date>2003-07-24T03:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: strange behavior?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-behavior/m-p/3031919#M906244</link>
      <description>echo $SHELL results in /usr/bin/ksh&lt;BR /&gt;which sh    results in /usr/bin/sh&lt;BR /&gt;which ksh   results in /usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;I beleive the user has tried his script using sh, but will ask.</description>
      <pubDate>Wed, 30 Jul 2003 20:22:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-behavior/m-p/3031919#M906244</guid>
      <dc:creator>donald thompson_2</dc:creator>
      <dc:date>2003-07-30T20:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: strange behavior?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-behavior/m-p/3031920#M906245</link>
      <description>&lt;BR /&gt;Remember the shell will first attempt filename expansion when dealing with []. It will pass '[0-9]' to grep only if it doesn't find any files named 0 thru 9; Otherwise, it will pass a list of matching files (eg grep 3 5 7) to mess things up.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Jul 2003 23:49:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-behavior/m-p/3031920#M906245</guid>
      <dc:creator>Jordan Bean</dc:creator>
      <dc:date>2003-07-30T23:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: strange behavior?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-behavior/m-p/3031921#M906246</link>
      <description>&lt;BR /&gt;Oh yeah, may I suggest using grep -E '^[0-9]$' ?</description>
      <pubDate>Wed, 30 Jul 2003 23:51:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-behavior/m-p/3031921#M906246</guid>
      <dc:creator>Jordan Bean</dc:creator>
      <dc:date>2003-07-30T23:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: strange behavior?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-behavior/m-p/3031922#M906247</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I agree with Jordan.  If you have any files called 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 it will fail.&lt;BR /&gt;&lt;BR /&gt;Check in / and I bet you find a file called 1 (and possibly 0).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers!</description>
      <pubDate>Thu, 31 Jul 2003 00:18:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-behavior/m-p/3031922#M906247</guid>
      <dc:creator>Tim Adamson_1</dc:creator>
      <dc:date>2003-07-31T00:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: strange behavior?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-behavior/m-p/3031923#M906248</link>
      <description>prolog:&lt;BR /&gt;the reason the this test failed - was because there was a file named 1 in the root directory ofthe first box I tested. This test will fail for any directory which happens to have a numbered file in it.&lt;BR /&gt;&lt;BR /&gt;thanks all for you help!</description>
      <pubDate>Thu, 31 Jul 2003 02:43:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-behavior/m-p/3031923#M906248</guid>
      <dc:creator>donald thompson_2</dc:creator>
      <dc:date>2003-07-31T02:43:41Z</dc:date>
    </item>
  </channel>
</rss>

