<?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: Advanced ksh shell help. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678039#M244922</link>
    <description>John,&lt;BR /&gt;&lt;BR /&gt;It does not work. I think 8 makes all difference.&lt;BR /&gt;&lt;BR /&gt;ll !([a-zA-Z0-9]*[.]*[a-za-Z0-9]*|[.]*[a-zA-Z0-9]|[a-zA-Z0-9]*[.])&lt;BR /&gt;-r--------   1 root       users          749 Nov  4 10:18 capplan&lt;BR /&gt;-r--------   1 capplan    users          398 Jul  9  2004 capplan.old&lt;BR /&gt;-r--------   1 root       dba           6303 Nov 22 13:50 oracle&lt;BR /&gt;-r--------   1 oracle     dba           4833 Aug 27  2004 oracle.old&lt;BR /&gt;-r--------   1 root       dba              0 Apr 12  2005 precise&lt;BR /&gt;-r--------   1 root       sys           3819 Jul 23 01:14 root&lt;BR /&gt;</description>
    <pubDate>Fri, 25 Nov 2005 04:07:15 GMT</pubDate>
    <dc:creator>RAC_1</dc:creator>
    <dc:date>2005-11-25T04:07:15Z</dc:date>
    <item>
      <title>Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678026#M244909</link>
      <description>I have files as follows and I want to list files that do not have "." as a character in them. Only with ksh/sh&lt;BR /&gt;&lt;BR /&gt;root.old&lt;BR /&gt;xync&lt;BR /&gt;xdr.cdb&lt;BR /&gt;port.ory&lt;BR /&gt;port&lt;BR /&gt;abc&lt;BR /&gt;&lt;BR /&gt;I tried following.&lt;BR /&gt;&lt;BR /&gt;ll [a-zA-Z]*[!\.][a-zA-Z]*&lt;BR /&gt;ll *[!\.]*&lt;BR /&gt;&lt;BR /&gt;and fe other combinations.&lt;BR /&gt;&lt;BR /&gt;Thank you in advance.</description>
      <pubDate>Thu, 24 Nov 2005 00:15:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678026#M244909</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-11-24T00:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678027#M244910</link>
      <description>Ofcourse, the easiest answer would be&lt;BR /&gt;&lt;BR /&gt;ll | grep -v '\.'&lt;BR /&gt;&lt;BR /&gt;I would have to think a little more about the&lt;BR /&gt;regexp solution.&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Nov 2005 00:26:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678027#M244910</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-11-24T00:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678028#M244911</link>
      <description>Not sure (needs testing), but the following&lt;BR /&gt;seems to work:&lt;BR /&gt;&lt;BR /&gt;ll [a-zA-Z][!\.]&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Nov 2005 00:39:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678028#M244911</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-11-24T00:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678029#M244912</link>
      <description>Bisawajit,&lt;BR /&gt;&lt;BR /&gt;That does not work.</description>
      <pubDate>Thu, 24 Nov 2005 00:46:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678029#M244912</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-11-24T00:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678030#M244913</link>
      <description>This works:&lt;BR /&gt;&lt;BR /&gt;# ll | grep -v '\.'&lt;BR /&gt;&lt;BR /&gt;You need to take care to protect the \. from the shell, e.g. using ''.&lt;BR /&gt;&lt;BR /&gt;Or simply use fgrep:&lt;BR /&gt;&lt;BR /&gt;# ls -l | fgrep -v .&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Nov 2005 02:55:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678030#M244913</guid>
      <dc:creator>Dietmar Konermann</dc:creator>
      <dc:date>2005-11-24T02:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678031#M244914</link>
      <description>RAC,&lt;BR /&gt;As Dietmar's advise would be solution.&lt;BR /&gt;ls -l | fgrep -v .&lt;BR /&gt;good luck,</description>
      <pubDate>Thu, 24 Nov 2005 04:08:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678031#M244914</guid>
      <dc:creator>Cem Tugrul</dc:creator>
      <dc:date>2005-11-24T04:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678032#M244915</link>
      <description>ls is using pattern matching instead of regular expression support.&lt;BR /&gt;&lt;BR /&gt;* is the problem in using with ls command.&lt;BR /&gt;&lt;BR /&gt;ll [a-zA-Z]*&lt;BR /&gt;&lt;BR /&gt;it is not meaning that,&lt;BR /&gt;&lt;BR /&gt; only a to z A to Z -- 0 or more times.&lt;BR /&gt;&lt;BR /&gt;It is meaning as,&lt;BR /&gt;&lt;BR /&gt; one a to z or A to Z in the beginning. Anything after that. It is including . 0-9 - + etc in that.&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;# ls -l [a-z]&lt;BR /&gt;-rw-rw-rw-   1 root       sys              0 Nov 23 23:54 a&lt;BR /&gt;# ls -l [a-z]*&lt;BR /&gt;-rw-rw-rw-   1 root       sys              0 Nov 23 23:54 a&lt;BR /&gt;-rw-rw-rw-   1 root       sys              0 Nov 23 23:35 bye&lt;BR /&gt;-rw-rw-rw-   1 root       sys              0 Nov 23 23:35 file1.&lt;BR /&gt;-rw-rw-rw-   1 root       sys              0 Nov 23 23:35 ok.ksh&lt;BR /&gt;-rw-rw-rw-   1 root       sys              0 Nov 24 01:38 ok_bye&lt;BR /&gt;-rw-rw-rw-   1 root       sys              0 Nov 23 23:35 test.sh&lt;BR /&gt;&lt;BR /&gt;To remove . then we must not use *. We have to handle it specifically as,&lt;BR /&gt;&lt;BR /&gt;ls -l [a-z][a-z][a-z][!\.]*&lt;BR /&gt;ls -l [a-z][a-z][a-z][a-z][!\.]*&lt;BR /&gt;&lt;BR /&gt;To avoid this you can with grep or awk as,&lt;BR /&gt;&lt;BR /&gt;ls -l | grep -v '\.'&lt;BR /&gt;ls -l | awk '!/\./ { print; }'&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Nov 2005 04:10:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678032#M244915</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-11-24T04:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678033#M244916</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;# ls -l | grep -v "[.]"&lt;BR /&gt;&lt;BR /&gt;should also work.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Nov 2005 06:04:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678033#M244916</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2005-11-24T06:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678034#M244917</link>
      <description>So this can not be explicitely done with [a-zA-Z]*[!.]* or similar pattern matching.&lt;BR /&gt;&lt;BR /&gt;While grep -v will what I want I wanted to use above pattern matching.</description>
      <pubDate>Thu, 24 Nov 2005 06:39:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678034#M244917</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-11-24T06:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678035#M244918</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;I think it will be quite difficult, as the pattern you want to specify should work on file name expansion directly.&lt;BR /&gt;This means that if you expand to a directory name and that directory holds a filename like the ones you specify, they are listed and not filtered out, as they would be if the above "grep" examples were used; these will work on the actual output of the commands.&lt;BR /&gt;I have tried with this terrible pattern:&lt;BR /&gt;&lt;BR /&gt;#  ls  !([a-zA-Z0-9]*[.]*[a-za-Z0-9]*|[.]*{a-zA-Z0-9]|[a-zA-Z0-9]*[.]$)&lt;BR /&gt;&lt;BR /&gt;which I hardly understand any longer myself, but if it matches a dir holding one of your files, the file will of course  be listed.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Thu, 24 Nov 2005 07:35:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678035#M244918</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2005-11-24T07:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678036#M244919</link>
      <description>I don't know what do you mean with ksh only, but this will work:&lt;BR /&gt;&lt;BR /&gt;for FILE in `ls`; do echo $FILE | awk -F "." 'NF==1 {print $0}';done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You can then customize the first ls to use the patters that you want.</description>
      <pubDate>Thu, 24 Nov 2005 07:38:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678036#M244919</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-11-24T07:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678037#M244920</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;# ls !([a-zA-Z0-9]*[.]*[a-za-Z0-9]*|[.]*{a-zA-Z0-9]|[a-zA-Z0-9]*[.]$)&lt;BR /&gt;&lt;BR /&gt;solution will list all files (including . dotted files).&lt;BR /&gt;&lt;BR /&gt;If we use * with ls it will everything. It is not like [a-z]* means to take a to z 0 to more times. It is taking as one a to z and anything other.&lt;BR /&gt;&lt;BR /&gt;We must not use *. We have to go with specific thing as in my previos reply.&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Nov 2005 03:24:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678037#M244920</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-11-25T03:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678038#M244921</link>
      <description>Hi Muthukumar,&lt;BR /&gt;&lt;BR /&gt;sorry, it should be:&lt;BR /&gt;&lt;BR /&gt;# ls !([a-zA-Z0-9]*[.]*[a-za-Z0-9]*|[.]*{a-zA-Z0-9]|[a-zA-Z0-9]*[.])&lt;BR /&gt;&lt;BR /&gt;and I think that it does not list the names of files with dots in the file name in the *current* directory.&lt;BR /&gt;Hoever, as the command also lists directory names, the files under those will be listed as they are and not filtered by grep.&lt;BR /&gt;Does the command list dot filenames in the "current directory" on your system?&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Nov 2005 03:57:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678038#M244921</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2005-11-25T03:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678039#M244922</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;It does not work. I think 8 makes all difference.&lt;BR /&gt;&lt;BR /&gt;ll !([a-zA-Z0-9]*[.]*[a-za-Z0-9]*|[.]*[a-zA-Z0-9]|[a-zA-Z0-9]*[.])&lt;BR /&gt;-r--------   1 root       users          749 Nov  4 10:18 capplan&lt;BR /&gt;-r--------   1 capplan    users          398 Jul  9  2004 capplan.old&lt;BR /&gt;-r--------   1 root       dba           6303 Nov 22 13:50 oracle&lt;BR /&gt;-r--------   1 oracle     dba           4833 Aug 27  2004 oracle.old&lt;BR /&gt;-r--------   1 root       dba              0 Apr 12  2005 precise&lt;BR /&gt;-r--------   1 root       sys           3819 Jul 23 01:14 root&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Nov 2005 04:07:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678039#M244922</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-11-25T04:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678040#M244923</link>
      <description>RAC,&lt;BR /&gt;&lt;BR /&gt;We may not get . negated files using ls -l &lt;PATTERN patching="" to="" negate="" .=""&gt;. We have to go to *ls* developers to get those possibility of negating . files without piping to some other utility. May be a classical problem?&lt;BR /&gt;&lt;BR /&gt;If you want to negate only . dotted files then,&lt;BR /&gt;&lt;BR /&gt;# alias lsn='ls -l | grep -v "\."'&lt;BR /&gt;# lsn&lt;BR /&gt;&lt;BR /&gt;that is all. ;)&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PATTERN&gt;</description>
      <pubDate>Fri, 25 Nov 2005 04:15:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678040#M244923</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-11-25T04:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678041#M244924</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;my example is for the ls command - not ll.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Fri, 25 Nov 2005 05:42:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678041#M244924</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2005-11-25T05:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678042#M244925</link>
      <description>ok.&lt;BR /&gt;&lt;BR /&gt;See this:&lt;BR /&gt;&lt;BR /&gt;# ls&lt;BR /&gt;a         file1     file1.sh  file2     file_ok   test.tar&lt;BR /&gt;#&lt;BR /&gt;#&lt;BR /&gt;# ls !([a-zA-Z0-9]*[.]*[a-za-Z0-9]*|[.]*{a-zA-Z0-9]|[a-zA-Z0-9]*[.])&lt;BR /&gt;a         file1     file1.sh  file2     file_ok   test.tar&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;Can you clarify here.&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Fri, 25 Nov 2005 05:56:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678042#M244925</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-11-25T05:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678043#M244926</link>
      <description>Hi Muthukumar,&lt;BR /&gt;&lt;BR /&gt;maybe I should have said that I executed&lt;BR /&gt;# sh&lt;BR /&gt;first, and then:&lt;BR /&gt;&lt;BR /&gt;# ls&lt;BR /&gt;a         file1     file1.sh  file.2    file_ok   test.tar&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# ls !([a-zA-Z0-9]*[.]*[a-za-Z0-9]*|[.]*{a-zA-Z0-0-9]|[a-zA-Z0-9]*[.])&lt;BR /&gt;a        file1    file_ok&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Nov 2005 06:51:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678043#M244926</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2005-11-25T06:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ksh shell help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678044#M244927</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;how about this:&lt;BR /&gt;ls&lt;BR /&gt;abc       port      port.ory  root.old  xdr.cdb   xync&lt;BR /&gt;&lt;BR /&gt;ls -d !(*.*)&lt;BR /&gt;abc   port  xync&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Nov 2005 08:09:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/advanced-ksh-shell-help/m-p/3678044#M244927</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2005-11-25T08:09:27Z</dc:date>
    </item>
  </channel>
</rss>

