<?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: script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240712#M173620</link>
    <description>Hello Mario,&lt;BR /&gt;&lt;BR /&gt;One way to do it :&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;var="012345"&lt;BR /&gt;length=${#var}&lt;BR /&gt;(( length -= 1 ))&lt;BR /&gt;echo $var | cut -c1-$length&lt;BR /&gt;&lt;BR /&gt;cheers</description>
    <pubDate>Tue, 06 Apr 2004 02:40:47 GMT</pubDate>
    <dc:creator>Nicolas Dumeige</dc:creator>
    <dc:date>2004-04-06T02:40:47Z</dc:date>
    <item>
      <title>script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240710#M173618</link>
      <description>Hello:&lt;BR /&gt;&lt;BR /&gt;  How can I eliminate the last character of a string in a shell script?&lt;BR /&gt;&lt;BR /&gt;    for example&lt;BR /&gt;&lt;BR /&gt;   pepitoA&lt;BR /&gt;   &lt;BR /&gt;   to&lt;BR /&gt;   &lt;BR /&gt;   pepito&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Mario.&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Apr 2004 02:28:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240710#M173618</guid>
      <dc:creator>Ana Perez_3</dc:creator>
      <dc:date>2004-04-06T02:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240711#M173619</link>
      <description>Use vi&lt;BR /&gt;&lt;BR /&gt;:s/oldtext/newtext/g&lt;BR /&gt;&lt;BR /&gt;sks</description>
      <pubDate>Tue, 06 Apr 2004 02:32:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240711#M173619</guid>
      <dc:creator>Sanjay Kumar Suri</dc:creator>
      <dc:date>2004-04-06T02:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240712#M173620</link>
      <description>Hello Mario,&lt;BR /&gt;&lt;BR /&gt;One way to do it :&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;var="012345"&lt;BR /&gt;length=${#var}&lt;BR /&gt;(( length -= 1 ))&lt;BR /&gt;echo $var | cut -c1-$length&lt;BR /&gt;&lt;BR /&gt;cheers</description>
      <pubDate>Tue, 06 Apr 2004 02:40:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240712#M173620</guid>
      <dc:creator>Nicolas Dumeige</dc:creator>
      <dc:date>2004-04-06T02:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240713#M173621</link>
      <description>Or simply&lt;BR /&gt; &lt;BR /&gt;expr "pepitoA" : "\(.*\)."</description>
      <pubDate>Tue, 06 Apr 2004 02:46:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240713#M173621</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-04-06T02:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240714#M173622</link>
      <description>Hi Mario,&lt;BR /&gt;&lt;BR /&gt;try this script:&lt;BR /&gt;&lt;BR /&gt;STRING_A=pepitoA&lt;BR /&gt;&lt;BR /&gt;STRING_B=`echo $STRING_A | awk '{printf("%s",substr($0,1,length($0)-1))}'`&lt;BR /&gt;&lt;BR /&gt;echo $STRING_B&lt;BR /&gt;&lt;BR /&gt;Be careful with the quotation.&lt;BR /&gt;&lt;BR /&gt;Frank.</description>
      <pubDate>Tue, 06 Apr 2004 02:50:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240714#M173622</guid>
      <dc:creator>Francisco J. Soler</dc:creator>
      <dc:date>2004-04-06T02:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240715#M173623</link>
      <description>Hi,&lt;BR /&gt;or use AWK.&lt;BR /&gt;&lt;BR /&gt;echo pepitoA | awk '{ n=length($0)-1; print substr( $0, 0, n) }'&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Peter</description>
      <pubDate>Tue, 06 Apr 2004 02:50:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240715#M173623</guid>
      <dc:creator>Hoefnix</dc:creator>
      <dc:date>2004-04-06T02:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240716#M173624</link>
      <description>... or &lt;BR /&gt;# echo PepitoA | sed -e 's/.$//'&lt;BR /&gt;:)</description>
      <pubDate>Tue, 06 Apr 2004 02:51:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240716#M173624</guid>
      <dc:creator>Nicolas Dumeige</dc:creator>
      <dc:date>2004-04-06T02:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240717#M173625</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;From shell man&lt;BR /&gt;&lt;BR /&gt;           ${parameter%pattern}&lt;BR /&gt;           ${parameter%%pattern}&lt;BR /&gt;                               If the shell pattern matches the end of the&lt;BR /&gt;                               value of parameter, the value of parameter&lt;BR /&gt;                               with the matched part is deleted; otherwise&lt;BR /&gt;                               substitute the value of parameter.  In the&lt;BR /&gt;                               former, the smallest matching pattern is&lt;BR /&gt;                               deleted; in the latter, the largest matching&lt;BR /&gt;                               pattern is deleted.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; /home/steves &amp;gt;p=pepitoA&lt;BR /&gt; /home/steves &amp;gt;p=${p%?}&lt;BR /&gt; /home/steves &amp;gt;echo $p&lt;BR /&gt;pepito&lt;BR /&gt;&lt;BR /&gt;                Steve Steel&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Apr 2004 03:00:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240717#M173625</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2004-04-06T03:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240718#M173626</link>
      <description>Hi Steve,&lt;BR /&gt;&lt;BR /&gt;I think your answer is the best one. I take note of it.&lt;BR /&gt;Congratulations.&lt;BR /&gt;&lt;BR /&gt;Frank.</description>
      <pubDate>Tue, 06 Apr 2004 03:08:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240718#M173626</guid>
      <dc:creator>Francisco J. Soler</dc:creator>
      <dc:date>2004-04-06T03:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240719#M173627</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;You can use&lt;BR /&gt;&lt;BR /&gt;sed 's/oldtext/netext/g' filename &amp;gt;filename&lt;BR /&gt;&lt;BR /&gt;cheers&lt;BR /&gt;Shyjith</description>
      <pubDate>Tue, 06 Apr 2004 03:17:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240719#M173627</guid>
      <dc:creator>Shyjith P K</dc:creator>
      <dc:date>2004-04-06T03:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240720#M173628</link>
      <description>Hi.&lt;BR /&gt;&lt;BR /&gt;The solusion of Steve is wonderful!&lt;BR /&gt;&lt;BR /&gt;My solution :&lt;BR /&gt;printf "pepitoA" | perl -pe chop&lt;BR /&gt;&lt;BR /&gt;(perl4 ok)&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Apr 2004 04:21:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3240720#M173628</guid>
      <dc:creator>Kiyoshi Miyake</dc:creator>
      <dc:date>2004-04-06T04:21:59Z</dc:date>
    </item>
  </channel>
</rss>

