<?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: exact match in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145147#M683863</link>
    <description>You need to include the "/" in the pattern:&lt;BR /&gt;mount | awk '/\/vghp17uv\// {print substr($1,2)}'&lt;BR /&gt;&lt;BR /&gt;If you are using awk, don't need cut.</description>
    <pubDate>Mon, 08 Dec 2008 07:11:36 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2008-12-08T07:11:36Z</dc:date>
    <item>
      <title>exact match</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145146#M683862</link>
      <description>Hi guys,&lt;BR /&gt;&lt;BR /&gt;I'm so tired to even think so can you please advice how can I get the exact string without getting the other similar one?&lt;BR /&gt;Get 10 easy points!&lt;BR /&gt;&lt;BR /&gt;# mount|awk '/vghp17uv/'&lt;BR /&gt;/uvtmp on /dev/vghp17uvtmp/lvol1 ioerror=mwdisable,largefiles,delaylog,dev=40040001 on Sun Nov 16 01:08:38 2008&lt;BR /&gt;/u1 on /dev/vghp17uv/lvol1 ioerror=mwdisable,largefiles,delaylog,dev=40020001 on Sun Nov 16 01:08:39 2008&lt;BR /&gt;&lt;BR /&gt;Here is the problem. It's not getting the right one?&lt;BR /&gt;# mount|awk '/vghp17uv/ {print $1}'|cut -d / -f 2&lt;BR /&gt;uvtmp&lt;BR /&gt;u1</description>
      <pubDate>Mon, 08 Dec 2008 05:53:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145146#M683862</guid>
      <dc:creator>Norman_21</dc:creator>
      <dc:date>2008-12-08T05:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: exact match</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145147#M683863</link>
      <description>You need to include the "/" in the pattern:&lt;BR /&gt;mount | awk '/\/vghp17uv\// {print substr($1,2)}'&lt;BR /&gt;&lt;BR /&gt;If you are using awk, don't need cut.</description>
      <pubDate>Mon, 08 Dec 2008 07:11:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145147#M683863</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-12-08T07:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: exact match</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145148#M683864</link>
      <description>Bang on! Just to note - even though it looks like 'V' (capital 'v'), it is actually, '\' followed by '/'</description>
      <pubDate>Mon, 08 Dec 2008 07:52:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145148#M683864</guid>
      <dc:creator>Venkatesh BL</dc:creator>
      <dc:date>2008-12-08T07:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: exact match</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145149#M683865</link>
      <description>&lt;BR /&gt;in PERL the Regular expressions have this nice \b to match on a word boundary.&lt;BR /&gt;&lt;BR /&gt;The solution then becomes...&lt;BR /&gt;&lt;BR /&gt;mount | perl -ne 'print $1 if /^.(\w+)\s.*\bvghp17uv\b/'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 08 Dec 2008 13:13:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145149#M683865</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2008-12-08T13:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: exact match</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145150#M683866</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;You could also use Perl which allows a variety of delimiters for regular expressions and makes using the '/' character simple to visualize.&lt;BR /&gt;&lt;BR /&gt;# mount|perl -nale 'print $F[0] if $F[2]=~m{/vghp17uv/}'&lt;BR /&gt;/u1&lt;BR /&gt;&lt;BR /&gt;This also avoids having to worry about the length of fields.  Notice that Perl numbers the first field as zero whereas 'awk' counts from one.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 08 Dec 2008 13:22:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145150#M683866</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-12-08T13:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: exact match</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145151#M683867</link>
      <description>If you're searching with regexps you need to delimit your search... vghp17uv is in both vghp17uv and vghp17uvtmp.&lt;BR /&gt;&lt;BR /&gt;mount | egrep "/vghp17uv/" | cut -d'/' -f2&lt;BR /&gt;&lt;BR /&gt;this should work better (since egrep doesn't bother with that // to specify a search) and give you a more exact match. &lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Fredrik Eriksson</description>
      <pubDate>Tue, 09 Dec 2008 15:57:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145151#M683867</guid>
      <dc:creator>Fredrik.eriksson</dc:creator>
      <dc:date>2008-12-09T15:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: exact match</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145152#M683868</link>
      <description>&amp;gt;Fredrik: since egrep doesn't bother &lt;BR /&gt;&lt;BR /&gt;There is no reason to use the egrep hammer, fgrep/grep is fine.  You can also use grep -w and leave out the "/".</description>
      <pubDate>Tue, 09 Dec 2008 22:23:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145152#M683868</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-12-09T22:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: exact match</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145153#M683869</link>
      <description>True, seems like I was abit tired to when i wrote it :P&lt;BR /&gt;grep would do it fine since no regexp is involved :P</description>
      <pubDate>Wed, 10 Dec 2008 08:17:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145153#M683869</guid>
      <dc:creator>Fredrik.eriksson</dc:creator>
      <dc:date>2008-12-10T08:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: exact match</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145154#M683870</link>
      <description>Closed</description>
      <pubDate>Tue, 27 Jan 2009 18:09:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/exact-match/m-p/5145154#M683870</guid>
      <dc:creator>Norman_21</dc:creator>
      <dc:date>2009-01-27T18:09:08Z</dc:date>
    </item>
  </channel>
</rss>

