<?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: file name in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/file-name/m-p/3296228#M715732</link>
    <description>Have you noticed the count with wc -c actually report 10 instead of 9 ?&lt;BR /&gt;Tou should use either ${#filename} or use awk as below to get the actual no. of characters.&lt;BR /&gt;echo $fname | awk {'print length'}&lt;BR /&gt;&lt;BR /&gt;# fname=fic_1.log&lt;BR /&gt;# echo $fname | wc -c&lt;BR /&gt;10&lt;BR /&gt;# echo $fname | awk {'print length'}  &lt;BR /&gt;9&lt;BR /&gt;# print ${#fname}                     &lt;BR /&gt;9&lt;BR /&gt;</description>
    <pubDate>Fri, 04 Jun 2004 09:27:25 GMT</pubDate>
    <dc:creator>Abdul Rahiman</dc:creator>
    <dc:date>2004-06-04T09:27:25Z</dc:date>
    <item>
      <title>file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-name/m-p/3296223#M715724</link>
      <description>Hello,&lt;BR /&gt;How to test the numbers of&lt;BR /&gt;caracters in a file name ?&lt;BR /&gt;example: fic_1.log&lt;BR /&gt;9 caracters for this file.&lt;BR /&gt;thanks a lot.</description>
      <pubDate>Fri, 04 Jun 2004 09:06:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-name/m-p/3296223#M715724</guid>
      <dc:creator>iranzo</dc:creator>
      <dc:date>2004-06-04T09:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-name/m-p/3296224#M715726</link>
      <description>echo "file_name|wc -c&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Fri, 04 Jun 2004 09:10:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-name/m-p/3296224#M715726</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-06-04T09:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-name/m-p/3296225#M715727</link>
      <description>fileName="fic_1.log"&lt;BR /&gt;print "${fileName} has ${#fileName} characters."</description>
      <pubDate>Fri, 04 Jun 2004 09:11:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-name/m-p/3296225#M715727</guid>
      <dc:creator>curt larson_1</dc:creator>
      <dc:date>2004-06-04T09:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-name/m-p/3296226#M715729</link>
      <description>don't even need to cat or echo the file...&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;wc /etc/hosts&lt;BR /&gt;18 94 567 /etc/hosts&lt;BR /&gt;&lt;BR /&gt;or wc -c /etc/hosts&lt;BR /&gt;567 /etc/hosts&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Fri, 04 Jun 2004 09:22:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-name/m-p/3296226#M715729</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-06-04T09:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-name/m-p/3296227#M715731</link>
      <description>It has to be echo "file_name\c"|wc -c&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Fri, 04 Jun 2004 09:22:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-name/m-p/3296227#M715731</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-06-04T09:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-name/m-p/3296228#M715732</link>
      <description>Have you noticed the count with wc -c actually report 10 instead of 9 ?&lt;BR /&gt;Tou should use either ${#filename} or use awk as below to get the actual no. of characters.&lt;BR /&gt;echo $fname | awk {'print length'}&lt;BR /&gt;&lt;BR /&gt;# fname=fic_1.log&lt;BR /&gt;# echo $fname | wc -c&lt;BR /&gt;10&lt;BR /&gt;# echo $fname | awk {'print length'}  &lt;BR /&gt;9&lt;BR /&gt;# print ${#fname}                     &lt;BR /&gt;9&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Jun 2004 09:27:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-name/m-p/3296228#M715732</guid>
      <dc:creator>Abdul Rahiman</dc:creator>
      <dc:date>2004-06-04T09:27:25Z</dc:date>
    </item>
  </channel>
</rss>

