<?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: Print in awk in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572724#M228418</link>
    <description>Hi,&lt;BR /&gt;another solution but similiar as others&lt;BR /&gt;from me;&lt;BR /&gt;ls -lrt|grep -v "^d"|awk '{print $NF}'&lt;BR /&gt;Good Luck,</description>
    <pubDate>Wed, 29 Jun 2005 02:02:29 GMT</pubDate>
    <dc:creator>Cem Tugrul</dc:creator>
    <dc:date>2005-06-29T02:02:29Z</dc:date>
    <item>
      <title>Print in awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572721#M228415</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;I want to print the last colum using awk. the column number may very&lt;BR /&gt;&lt;BR /&gt;drwxrwxr-x    2 tariq    users        1024 Jun 27 13:36 .&lt;BR /&gt;drwxr-xr-x    5 tariq    users        1024 Jun 27 12:11 ..&lt;BR /&gt;-rw-rw-r--    1 tariq    users           5 Jun 27 13:36 test&lt;BR /&gt;w-rw-r--    1 tariq    users           6 Jun 10 09:38 file01&lt;BR /&gt;-rw-rw-r--    1 tariq    users           7 Jun 10 09:38 file02&lt;BR /&gt;-rw-rw-r--    1 tariq    users           7 Jun 10 09:39 file03&lt;BR /&gt;&lt;BR /&gt;from the above putput i want to print only &lt;BR /&gt;test&lt;BR /&gt;file01&lt;BR /&gt;file02&lt;BR /&gt;file03&lt;BR /&gt;&lt;BR /&gt;How can i do that. I cannot use print $4 as sometime the file name will be in different column.</description>
      <pubDate>Tue, 28 Jun 2005 22:57:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572721#M228415</guid>
      <dc:creator>M. Tariq Ayub</dc:creator>
      <dc:date>2005-06-28T22:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Print in awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572722#M228416</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Sorry if I'm misunderstanding you, but can you not use:&lt;BR /&gt;$ ls -l | awk '{print $9}' | grep -v "^.[?]"&lt;BR /&gt;&lt;BR /&gt;OR alternatively use:&lt;BR /&gt;$ ls -l | awk '{print $NF}' | grep -v "^.[?]"&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Con</description>
      <pubDate>Tue, 28 Jun 2005 23:14:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572722#M228416</guid>
      <dc:creator>Con O'Kelly</dc:creator>
      <dc:date>2005-06-28T23:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Print in awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572723#M228417</link>
      <description>You can get last column with NF parameter as,&lt;BR /&gt;&lt;BR /&gt;ls -l | awk '{ print $NF }'&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Wed, 29 Jun 2005 01:45:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572723#M228417</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-06-29T01:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Print in awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572724#M228418</link>
      <description>Hi,&lt;BR /&gt;another solution but similiar as others&lt;BR /&gt;from me;&lt;BR /&gt;ls -lrt|grep -v "^d"|awk '{print $NF}'&lt;BR /&gt;Good Luck,</description>
      <pubDate>Wed, 29 Jun 2005 02:02:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572724#M228418</guid>
      <dc:creator>Cem Tugrul</dc:creator>
      <dc:date>2005-06-29T02:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Print in awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572725#M228419</link>
      <description>"^d" anchor directory so "grep -v exclude&lt;BR /&gt;directories so you can get only files...&lt;BR /&gt;good luck,</description>
      <pubDate>Wed, 29 Jun 2005 02:06:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572725#M228419</guid>
      <dc:creator>Cem Tugrul</dc:creator>
      <dc:date>2005-06-29T02:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Print in awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572726#M228420</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;if you really want to list files only, try&lt;BR /&gt;&lt;BR /&gt;ls -p | awk '!/[@/]'&lt;BR /&gt;&lt;BR /&gt;It's fast and you need not bother with filenames containing spaces.&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Fri, 01 Jul 2005 04:41:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572726#M228420</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2005-07-01T04:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Print in awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572727#M228421</link>
      <description>You can also try with perl as,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# ls -l | perl -ne 'split(/ /); $var=@_; $var-=1;print $_[$var];'&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Fri, 01 Jul 2005 05:01:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572727#M228421</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-07-01T05:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Print in awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572728#M228422</link>
      <description>If all you want to do is print the file names, why not use "ls |lp -dprintername"? No need to use awk.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Brian</description>
      <pubDate>Fri, 15 Jul 2005 14:52:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572728#M228422</guid>
      <dc:creator>Brian Butscher</dc:creator>
      <dc:date>2005-07-15T14:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Print in awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572729#M228423</link>
      <description>Why use awk or sed when you can do it simply with the ls command:&lt;BR /&gt;&lt;BR /&gt;# ls -1 &lt;DIR_NAME&gt;&lt;BR /&gt;&lt;BR /&gt;cheers!&lt;/DIR_NAME&gt;</description>
      <pubDate>Fri, 15 Jul 2005 15:23:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/print-in-awk/m-p/3572729#M228423</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2005-07-15T15:23:28Z</dc:date>
    </item>
  </channel>
</rss>

