<?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: Grepping pattern from a File in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006479#M425641</link>
    <description>Thanks for the command.&lt;BR /&gt;Its working fine..&lt;BR /&gt;&lt;BR /&gt;But One more query,&lt;BR /&gt;Can we save the value in a variable..&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 03 Oct 2006 04:08:28 GMT</pubDate>
    <dc:creator>Virumandi</dc:creator>
    <dc:date>2006-10-03T04:08:28Z</dc:date>
    <item>
      <title>Grepping pattern from a File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006474#M425636</link>
      <description>Hi ,&lt;BR /&gt;&lt;BR /&gt;I want to grep a particular pattern from a file...&lt;BR /&gt;&lt;BR /&gt;The string will be like this...&lt;BR /&gt;&lt;BR /&gt;multimediaGroup type="media" dbid="525"&lt;BR /&gt;&lt;BR /&gt;I want to grep the dbid value say 525 from the file ...&lt;BR /&gt;&lt;BR /&gt;How can I do it with sed or perl..</description>
      <pubDate>Tue, 03 Oct 2006 03:45:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006474#M425636</guid>
      <dc:creator>Virumandi</dc:creator>
      <dc:date>2006-10-03T03:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Grepping pattern from a File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006475#M425637</link>
      <description>I dont know the dbid value But i am sure that it is a three digit numeric number..</description>
      <pubDate>Tue, 03 Oct 2006 03:47:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006475#M425637</guid>
      <dc:creator>Virumandi</dc:creator>
      <dc:date>2006-10-03T03:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Grepping pattern from a File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006476#M425638</link>
      <description>Hi,&lt;BR /&gt;if your input file format is consistent:&lt;BR /&gt;cat input.dat | grep dbid | awk -F'"' '{print $4}'&lt;BR /&gt;&lt;BR /&gt;Please also start rewarding answers to your questions:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#28" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#28&lt;/A&gt;</description>
      <pubDate>Tue, 03 Oct 2006 03:54:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006476#M425638</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-10-03T03:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Grepping pattern from a File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006477#M425639</link>
      <description>consistency is the key here ;-)</description>
      <pubDate>Tue, 03 Oct 2006 03:59:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006477#M425639</guid>
      <dc:creator>Michal Toth</dc:creator>
      <dc:date>2006-10-03T03:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Grepping pattern from a File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006478#M425640</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;grep is grep:&lt;BR /&gt;&lt;BR /&gt;grep "dbid=\"[0-9][0-9][0-9]\"$" /your_infile&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Oct 2006 04:04:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006478#M425640</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2006-10-03T04:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Grepping pattern from a File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006479#M425641</link>
      <description>Thanks for the command.&lt;BR /&gt;Its working fine..&lt;BR /&gt;&lt;BR /&gt;But One more query,&lt;BR /&gt;Can we save the value in a variable..&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Oct 2006 04:08:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006479#M425641</guid>
      <dc:creator>Virumandi</dc:creator>
      <dc:date>2006-10-03T04:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: Grepping pattern from a File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006480#M425642</link>
      <description>Hi Peter..,&lt;BR /&gt;&lt;BR /&gt;Your solution works but We cant able to assign the value we grepped to the variable..&lt;BR /&gt;&lt;BR /&gt;Can u guide to me how to do the same.&lt;BR /&gt;&lt;BR /&gt;Thanks...</description>
      <pubDate>Tue, 03 Oct 2006 04:27:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006480#M425642</guid>
      <dc:creator>Virumandi</dc:creator>
      <dc:date>2006-10-03T04:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Grepping pattern from a File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006481#M425643</link>
      <description>Hi,&lt;BR /&gt;if you only find a single dbid in the file:&lt;BR /&gt;a=`grep dbid | awk -F'"' '{print $4}'`&lt;BR /&gt;&lt;BR /&gt;Otherwise:&lt;BR /&gt;while read record&lt;BR /&gt;do&lt;BR /&gt;a=`echo $record | grep dbid | awk -F'"' '{print $4}'`&lt;BR /&gt;echo "This is your variable value" $a&lt;BR /&gt;done &amp;lt; input.dat</description>
      <pubDate>Tue, 03 Oct 2006 05:23:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006481#M425643</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-10-03T05:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Grepping pattern from a File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006482#M425644</link>
      <description>Hi,&lt;BR /&gt;this retrun teh value in the variable dbid&lt;BR /&gt;&lt;BR /&gt;dbid=$(awk -F"dbid=" '/dbid=/ {print $2}' file)&lt;BR /&gt;&lt;BR /&gt;This command is indipendent by teh dbid position on the line. It founds line containg 'dbid=' and print the subsequent field. BY awk is not necessary to use cat and/or grep etc. awk is able to open a file.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Wed, 04 Oct 2006 02:43:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006482#M425644</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2006-10-04T02:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Grepping pattern from a File</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006483#M425645</link>
      <description>Thanks to all...</description>
      <pubDate>Fri, 06 Oct 2006 00:57:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grepping-pattern-from-a-file/m-p/5006483#M425645</guid>
      <dc:creator>Virumandi</dc:creator>
      <dc:date>2006-10-06T00:57:24Z</dc:date>
    </item>
  </channel>
</rss>

