<?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: string manipulation in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/string-manipulation/m-p/4246616#M687410</link>
    <description>In Shell programming there are always a lot of ways to do anything.  Here's a way to do it in awk:&lt;BR /&gt; echo "Show 2008 -201"|awk -F" " '{ print $1" "$2$3 }</description>
    <pubDate>Tue, 05 Aug 2008 18:03:07 GMT</pubDate>
    <dc:creator>Chris Vail</dc:creator>
    <dc:date>2008-08-05T18:03:07Z</dc:date>
    <item>
      <title>string manipulation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/string-manipulation/m-p/4246613#M687407</link>
      <description>How can I change &lt;BR /&gt;"Show 2008 -201" to "Show 2008-201"? &lt;BR /&gt;Basically, how can I remove the space before the "-".&lt;BR /&gt;Thank you</description>
      <pubDate>Tue, 05 Aug 2008 16:04:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/string-manipulation/m-p/4246613#M687407</guid>
      <dc:creator>shellProgramming</dc:creator>
      <dc:date>2008-08-05T16:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: string manipulation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/string-manipulation/m-p/4246614#M687408</link>
      <description>Hello shellProgramming,&lt;BR /&gt;&lt;BR /&gt;Welcome to the HPUX Forums.&lt;BR /&gt;&lt;BR /&gt;There are 100s of ways.&lt;BR /&gt;&lt;BR /&gt;Here is one.  &lt;BR /&gt;&lt;BR /&gt;echo "Show 2008 -201"|sed -e s/\ -/-/g&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Aug 2008 16:09:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/string-manipulation/m-p/4246614#M687408</guid>
      <dc:creator>Tim Nelson</dc:creator>
      <dc:date>2008-08-05T16:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: string manipulation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/string-manipulation/m-p/4246615#M687409</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;While I would use 'sed' (or Perl) for the transformation you show, if you want to use pure shell, you can do:&lt;BR /&gt;&lt;BR /&gt;# echo Show 2008 -201|read A B C;echo "${A} ${B}${C}"&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 05 Aug 2008 16:22:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/string-manipulation/m-p/4246615#M687409</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-05T16:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: string manipulation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/string-manipulation/m-p/4246616#M687410</link>
      <description>In Shell programming there are always a lot of ways to do anything.  Here's a way to do it in awk:&lt;BR /&gt; echo "Show 2008 -201"|awk -F" " '{ print $1" "$2$3 }</description>
      <pubDate>Tue, 05 Aug 2008 18:03:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/string-manipulation/m-p/4246616#M687410</guid>
      <dc:creator>Chris Vail</dc:creator>
      <dc:date>2008-08-05T18:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: string manipulation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/string-manipulation/m-p/4246617#M687411</link>
      <description>And one more (with search and replace): &lt;BR /&gt;&lt;BR /&gt;echo "Show 2008 -201" | awk '{sub(/ -/,"-");print}'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;ivan</description>
      <pubDate>Tue, 05 Aug 2008 18:20:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/string-manipulation/m-p/4246617#M687411</guid>
      <dc:creator>Ivan Krastev</dc:creator>
      <dc:date>2008-08-05T18:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: string manipulation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/string-manipulation/m-p/4246618#M687412</link>
      <description>Thank you all&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Aug 2008 01:16:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/string-manipulation/m-p/4246618#M687412</guid>
      <dc:creator>shellProgramming</dc:creator>
      <dc:date>2008-08-06T01:16:32Z</dc:date>
    </item>
  </channel>
</rss>

