<?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: get the last string of a line in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/get-the-last-string-of-a-line/m-p/4973555#M102023</link>
    <description>Elif,&lt;BR /&gt;man basename should supply the answer&lt;BR /&gt;&lt;BR /&gt;basename /var/opt/perf/parm would return parm</description>
    <pubDate>Thu, 13 Apr 2006 05:22:15 GMT</pubDate>
    <dc:creator>Peter Godron</dc:creator>
    <dc:date>2006-04-13T05:22:15Z</dc:date>
    <item>
      <title>get the last string of a line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/get-the-last-string-of-a-line/m-p/4973554#M102022</link>
      <description>Hi all&lt;BR /&gt;I want to print the last string in a line.&lt;BR /&gt;If my path is "/var/opt/perf/parm" , I want to extract "parm", if "/var/stm/config/tools/monitor/sysstat_em.sapcfg", then only sysstat_em.sapcfg" should be extracted automatically. &lt;BR /&gt;&lt;BR /&gt;I need only the last word in the line. How  can I do this?&lt;BR /&gt;I look for some awk or sed commands.</description>
      <pubDate>Thu, 13 Apr 2006 05:16:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/get-the-last-string-of-a-line/m-p/4973554#M102022</guid>
      <dc:creator>Elif Gius</dc:creator>
      <dc:date>2006-04-13T05:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: get the last string of a line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/get-the-last-string-of-a-line/m-p/4973555#M102023</link>
      <description>Elif,&lt;BR /&gt;man basename should supply the answer&lt;BR /&gt;&lt;BR /&gt;basename /var/opt/perf/parm would return parm</description>
      <pubDate>Thu, 13 Apr 2006 05:22:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/get-the-last-string-of-a-line/m-p/4973555#M102023</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-04-13T05:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: get the last string of a line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/get-the-last-string-of-a-line/m-p/4973556#M102024</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;try&lt;BR /&gt;# basename var/stm/config/tools/monitor/sysstat_em.sapcfg&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Thu, 13 Apr 2006 05:22:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/get-the-last-string-of-a-line/m-p/4973556#M102024</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2006-04-13T05:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: get the last string of a line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/get-the-last-string-of-a-line/m-p/4973557#M102025</link>
      <description>Demat,&lt;BR /&gt;&lt;BR /&gt;If I well understand :-) try with this :&lt;BR /&gt;&lt;BR /&gt;echo "/var/stm/config/tools/sysstat_em.sapcfg"|awk -F\/ '{print $NF}'&lt;BR /&gt;&lt;BR /&gt;It should always extract the last field of your string with the / as Field separator.&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;Kenavo&lt;BR /&gt;Pat</description>
      <pubDate>Thu, 13 Apr 2006 05:23:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/get-the-last-string-of-a-line/m-p/4973557#M102025</guid>
      <dc:creator>Patrice Le Guyader</dc:creator>
      <dc:date>2006-04-13T05:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: get the last string of a line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/get-the-last-string-of-a-line/m-p/4973558#M102026</link>
      <description>so I want a sed or awk command which deletes any prefix that ends with a / (slash)</description>
      <pubDate>Thu, 13 Apr 2006 05:26:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/get-the-last-string-of-a-line/m-p/4973558#M102026</guid>
      <dc:creator>Elif Gius</dc:creator>
      <dc:date>2006-04-13T05:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: get the last string of a line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/get-the-last-string-of-a-line/m-p/4973559#M102027</link>
      <description>thanks, basename and the awk was the hint I searched for.&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Apr 2006 05:28:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/get-the-last-string-of-a-line/m-p/4973559#M102027</guid>
      <dc:creator>Elif Gius</dc:creator>
      <dc:date>2006-04-13T05:28:56Z</dc:date>
    </item>
  </channel>
</rss>

