<?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 unix script problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script-problem/m-p/3102488#M147135</link>
    <description>Hi,&lt;BR /&gt;I have written the scrip and using the below command:&lt;BR /&gt;ls -1 | awk '{print $NF}' | cut -f1 -d'.'  | grep -v '_[0-9]' | sort -u&lt;BR /&gt;&lt;BR /&gt;this gets all the files till the period and than ignores them if they have " _[0-9] " its working ok but I find out that its not getting only one file with the name "nwit00_1400.Oct21"&lt;BR /&gt;because this file got " 00 " before " _1400" &lt;BR /&gt;&lt;BR /&gt;what I think is above command first gets the filename till period so it will be "nwit00_1400" than ignores the files with "_1400" (underscore and nubmers) but its ignoring this file altogether can someone help me, what should I do so I can get all the files including this one.&lt;BR /&gt;&lt;BR /&gt;thanks</description>
    <pubDate>Sun, 26 Oct 2003 20:48:36 GMT</pubDate>
    <dc:creator>Nitin Nigam</dc:creator>
    <dc:date>2003-10-26T20:48:36Z</dc:date>
    <item>
      <title>unix script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script-problem/m-p/3102488#M147135</link>
      <description>Hi,&lt;BR /&gt;I have written the scrip and using the below command:&lt;BR /&gt;ls -1 | awk '{print $NF}' | cut -f1 -d'.'  | grep -v '_[0-9]' | sort -u&lt;BR /&gt;&lt;BR /&gt;this gets all the files till the period and than ignores them if they have " _[0-9] " its working ok but I find out that its not getting only one file with the name "nwit00_1400.Oct21"&lt;BR /&gt;because this file got " 00 " before " _1400" &lt;BR /&gt;&lt;BR /&gt;what I think is above command first gets the filename till period so it will be "nwit00_1400" than ignores the files with "_1400" (underscore and nubmers) but its ignoring this file altogether can someone help me, what should I do so I can get all the files including this one.&lt;BR /&gt;&lt;BR /&gt;thanks</description>
      <pubDate>Sun, 26 Oct 2003 20:48:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script-problem/m-p/3102488#M147135</guid>
      <dc:creator>Nitin Nigam</dc:creator>
      <dc:date>2003-10-26T20:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: unix script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script-problem/m-p/3102489#M147136</link>
      <description>Please revert with the list of files too and what you need</description>
      <pubDate>Mon, 27 Oct 2003 00:52:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script-problem/m-p/3102489#M147136</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2003-10-27T00:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: unix script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script-problem/m-p/3102490#M147137</link>
      <description>actually the grep will match lines not contain an underscore followed by a digit.&lt;BR /&gt;but it doing just what it is supposed to do.&lt;BR /&gt;just an ls would do the same as ls -1 for you.  and with only one filename per line, using awk to print the only field is unnecessary. &lt;BR /&gt;ls | cut -f1 -d'.' | grep -v '_[0-9]' | sort -u&lt;BR /&gt;would do just the same for you. and&lt;BR /&gt;ls | awk -F'.' { if ( $1 !~ /_[0-9]/ ) print $1;}' | sort -u&lt;BR /&gt;is a bit faster&lt;BR /&gt;&lt;BR /&gt;hard to give advice on how to help you without knowing what's your data and what your expected output should be</description>
      <pubDate>Mon, 27 Oct 2003 01:25:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script-problem/m-p/3102490#M147137</guid>
      <dc:creator>curt larson_1</dc:creator>
      <dc:date>2003-10-27T01:25:48Z</dc:date>
    </item>
  </channel>
</rss>

