<?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: the sed command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/the-sed-command/m-p/3475144#M212420</link>
    <description>Hi Vaman,&lt;BR /&gt;&lt;BR /&gt;Just do "l -ld /dev/vg*" instead of ls -ld .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;BL.&lt;BR /&gt;:)</description>
    <pubDate>Tue, 01 Feb 2005 15:05:46 GMT</pubDate>
    <dc:creator>baiju_3</dc:creator>
    <dc:date>2005-02-01T15:05:46Z</dc:date>
    <item>
      <title>the sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/the-sed-command/m-p/3475138#M212414</link>
      <description>I am trying one command&lt;BR /&gt;ls -ld /dev/vg_rdo1_s_rac_dbf0* | awk '{print $9}'&lt;BR /&gt;The o/p is&lt;BR /&gt;/dev/vg_rdo1_s_rac_dbf01/&lt;BR /&gt;/dev/vg_rdo1_s_rac_dbf02/&lt;BR /&gt;/dev/vg_rdo1_s_rac_dbf03/&lt;BR /&gt;/dev/vg_rdo1_s_rac_dbf04/&lt;BR /&gt;/dev/vg_rdo1_s_rac_dbf05/&lt;BR /&gt;/dev/vg_rdo1_s_rac_dbf06/&lt;BR /&gt;/dev/vg_rdo1_s_rac_dbf07/&lt;BR /&gt;&lt;BR /&gt;I want to remove the last / from above output so i can run vgdisplay in loop. I would like to know how sed can be used to carry out this activity&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Jan 2005 16:27:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/the-sed-command/m-p/3475138#M212414</guid>
      <dc:creator>vaman</dc:creator>
      <dc:date>2005-01-31T16:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: the sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/the-sed-command/m-p/3475139#M212415</link>
      <description>just&lt;BR /&gt;&lt;BR /&gt;awk '{print $9}' | &lt;BR /&gt;sed 's!/$!!'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Jan 2005 16:39:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/the-sed-command/m-p/3475139#M212415</guid>
      <dc:creator>c_51</dc:creator>
      <dc:date>2005-01-31T16:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: the sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/the-sed-command/m-p/3475140#M212416</link>
      <description>With your syntax, ls on hpux doesn't put the trailing slash if it is a dir unless you specify -p option. Do you have ls aliased?&lt;BR /&gt;&lt;BR /&gt;try &lt;BR /&gt;&lt;BR /&gt;/usr/bin/ls -ld /dev/vg_rdo1_s_rac_dbf0* | awk '{print $9}'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-denver</description>
      <pubDate>Mon, 31 Jan 2005 16:41:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/the-sed-command/m-p/3475140#M212416</guid>
      <dc:creator>Denver Osborn</dc:creator>
      <dc:date>2005-01-31T16:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: the sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/the-sed-command/m-p/3475141#M212417</link>
      <description>This will work...&lt;BR /&gt;&lt;BR /&gt;for name in `ls -ld /dev/vg_rdo1_s_rac_dbf0*|awk -F\/ '{ print $X }' `&lt;BR /&gt;do&lt;BR /&gt;vgdisplay  /dev/$name&lt;BR /&gt;done &amp;gt; outputfile.out&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Where the $X is equal to the field number using / as a delimeter...</description>
      <pubDate>Mon, 31 Jan 2005 17:10:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/the-sed-command/m-p/3475141#M212417</guid>
      <dc:creator>Todd McDaniel_1</dc:creator>
      <dc:date>2005-01-31T17:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: the sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/the-sed-command/m-p/3475142#M212418</link>
      <description>cd /dev&lt;BR /&gt;for i in `ls -d vg_rdo1_s_rac_dbf0*`&lt;BR /&gt;do&lt;BR /&gt;vgdisplay $i&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Jan 2005 22:01:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/the-sed-command/m-p/3475142#M212418</guid>
      <dc:creator>Matthew_50</dc:creator>
      <dc:date>2005-01-31T22:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: the sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/the-sed-command/m-p/3475143#M212419</link>
      <description>AWK supports regular expressions like sed the sub will remove the last /&lt;BR /&gt;&lt;BR /&gt;Rory&lt;BR /&gt;&lt;BR /&gt;ls -ld /dev/vg_rdo1_s_rac_dbf0* | awk '{sub("/$","",$9)&lt;BR /&gt;print $9 }'</description>
      <pubDate>Tue, 01 Feb 2005 12:45:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/the-sed-command/m-p/3475143#M212419</guid>
      <dc:creator>Rory R Hammond</dc:creator>
      <dc:date>2005-02-01T12:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: the sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/the-sed-command/m-p/3475144#M212420</link>
      <description>Hi Vaman,&lt;BR /&gt;&lt;BR /&gt;Just do "l -ld /dev/vg*" instead of ls -ld .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;BL.&lt;BR /&gt;:)</description>
      <pubDate>Tue, 01 Feb 2005 15:05:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/the-sed-command/m-p/3475144#M212420</guid>
      <dc:creator>baiju_3</dc:creator>
      <dc:date>2005-02-01T15:05:46Z</dc:date>
    </item>
  </channel>
</rss>

