<?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: remove leading character in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-leading-character/m-p/3115488#M149685</link>
    <description>Thanks Guys! our File system monitoring script is now complete. I am attaching the script file.</description>
    <pubDate>Mon, 10 Nov 2003 22:08:51 GMT</pubDate>
    <dc:creator>John Roy Arendain</dc:creator>
    <dc:date>2003-11-10T22:08:51Z</dc:date>
    <item>
      <title>remove leading character</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-leading-character/m-p/3115483#M149680</link>
      <description>Please advise what command do I use to remove the leading character "%" from the output of command "bdf â  l | awk â  {print $5}â  "</description>
      <pubDate>Mon, 10 Nov 2003 21:02:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-leading-character/m-p/3115483#M149680</guid>
      <dc:creator>John Roy Arendain</dc:creator>
      <dc:date>2003-11-10T21:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: remove leading character</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-leading-character/m-p/3115484#M149681</link>
      <description>'^' for leading character.&lt;BR /&gt;&lt;BR /&gt;Maybe:&lt;BR /&gt; &lt;BR /&gt;# sed 's/^//g' filename&lt;BR /&gt; &lt;BR /&gt;Try this handy SED URL:&lt;BR /&gt; &lt;BR /&gt;&lt;A href="http://www-h.eng.cam.ac.uk/help/tpl/unix/sed.html" target="_blank"&gt;http://www-h.eng.cam.ac.uk/help/tpl/unix/sed.html&lt;/A&gt;</description>
      <pubDate>Mon, 10 Nov 2003 21:29:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-leading-character/m-p/3115484#M149681</guid>
      <dc:creator>Michael Steele_2</dc:creator>
      <dc:date>2003-11-10T21:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: remove leading character</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-leading-character/m-p/3115485#M149682</link>
      <description>Or you can use tr:&lt;BR /&gt; &lt;BR /&gt;bdf | tr "%" " " | awk '{print $5}'&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Nov 2003 21:51:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-leading-character/m-p/3115485#M149682</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-11-10T21:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: remove leading character</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-leading-character/m-p/3115486#M149683</link>
      <description>Use &lt;BR /&gt;bdf|awk '{print $5}'|sed 's/%//g'&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Nov 2003 21:52:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-leading-character/m-p/3115486#M149683</guid>
      <dc:creator>Rajeev  Shukla</dc:creator>
      <dc:date>2003-11-10T21:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: remove leading character</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-leading-character/m-p/3115487#M149684</link>
      <description>And if you want %used to be left as it is try&lt;BR /&gt;&lt;BR /&gt;bdf|awk '{print $5}'|sed 's/%$//g'</description>
      <pubDate>Mon, 10 Nov 2003 21:54:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-leading-character/m-p/3115487#M149684</guid>
      <dc:creator>Rajeev  Shukla</dc:creator>
      <dc:date>2003-11-10T21:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: remove leading character</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-leading-character/m-p/3115488#M149685</link>
      <description>Thanks Guys! our File system monitoring script is now complete. I am attaching the script file.</description>
      <pubDate>Mon, 10 Nov 2003 22:08:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-leading-character/m-p/3115488#M149685</guid>
      <dc:creator>John Roy Arendain</dc:creator>
      <dc:date>2003-11-10T22:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: remove leading character</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-leading-character/m-p/3115489#M149686</link>
      <description>The bdf line in your script will only work for short filesystem names.  Perhaps you are lucky and only have short names but on many systems the output of bdf for a filesystem often covers 2 lines so your bdf line might be better something like:&lt;BR /&gt; bdf ${FS[$i]} | grep " ${FS[$i]}$" | awk '{ print $(NF-1) }' | sed 's/%//'</description>
      <pubDate>Tue, 11 Nov 2003 18:50:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-leading-character/m-p/3115489#M149686</guid>
      <dc:creator>Duncan Galbraith</dc:creator>
      <dc:date>2003-11-11T18:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: remove leading character</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-leading-character/m-p/3115490#M149687</link>
      <description>And if you want to combine Duncan's fix to cope with &amp;gt; 1 line, and avoid grep and sed, doing it all with awk in one shot, how about.&lt;BR /&gt;&lt;BR /&gt;bdf ${FS[$i]} |awk '/^Filesystem/ {next} (NF==1) {getline} {print substr($(NF-1),1,length($(NF-1)-1))}'&lt;BR /&gt;&lt;BR /&gt;-- Graham</description>
      <pubDate>Wed, 12 Nov 2003 03:36:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-leading-character/m-p/3115490#M149687</guid>
      <dc:creator>Graham Cameron_1</dc:creator>
      <dc:date>2003-11-12T03:36:17Z</dc:date>
    </item>
  </channel>
</rss>

