<?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 String checking in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/string-checking/m-p/3143785#M801460</link>
    <description>Hi Guys,&lt;BR /&gt;&lt;BR /&gt;In my shell script I have 2 strings:&lt;BR /&gt;&lt;BR /&gt;s1="test string"&lt;BR /&gt;s2=" this is a test string but it is longer"&lt;BR /&gt;&lt;BR /&gt;I have to find whether s2 contains s1 if true I have to some operation any command help will be helpful.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
    <pubDate>Fri, 12 Dec 2003 15:37:52 GMT</pubDate>
    <dc:creator>dude70_1</dc:creator>
    <dc:date>2003-12-12T15:37:52Z</dc:date>
    <item>
      <title>String checking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/string-checking/m-p/3143785#M801460</link>
      <description>Hi Guys,&lt;BR /&gt;&lt;BR /&gt;In my shell script I have 2 strings:&lt;BR /&gt;&lt;BR /&gt;s1="test string"&lt;BR /&gt;s2=" this is a test string but it is longer"&lt;BR /&gt;&lt;BR /&gt;I have to find whether s2 contains s1 if true I have to some operation any command help will be helpful.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Fri, 12 Dec 2003 15:37:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/string-checking/m-p/3143785#M801460</guid>
      <dc:creator>dude70_1</dc:creator>
      <dc:date>2003-12-12T15:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: String checking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/string-checking/m-p/3143786#M801461</link>
      <description>echo $s2|grep "$s1"</description>
      <pubDate>Fri, 12 Dec 2003 15:47:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/string-checking/m-p/3143786#M801461</guid>
      <dc:creator>James A. Donovan</dc:creator>
      <dc:date>2003-12-12T15:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: String checking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/string-checking/m-p/3143787#M801462</link>
      <description>Edit your script to look like this,&lt;BR /&gt;&lt;BR /&gt;s1="test string"&lt;BR /&gt;s2=" this is a test string but it is longer"&lt;BR /&gt;echo $s2 |grep "\&amp;lt;$s1\&amp;gt;"&lt;BR /&gt;if [ $? -eq 0 ]&lt;BR /&gt;then&lt;BR /&gt;echo s2 contains s1&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;-Karthik S S</description>
      <pubDate>Fri, 12 Dec 2003 15:47:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/string-checking/m-p/3143787#M801462</guid>
      <dc:creator>Karthik S S</dc:creator>
      <dc:date>2003-12-12T15:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: String checking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/string-checking/m-p/3143788#M801463</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;expr "${s2}" : ".*\(${s1}\).*"&lt;BR /&gt;&lt;BR /&gt;returns s1 if it is included in s2.&lt;BR /&gt;&lt;BR /&gt;have fun,&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Dec 2003 16:01:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/string-checking/m-p/3143788#M801463</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2003-12-12T16:01:45Z</dc:date>
    </item>
  </channel>
</rss>

