<?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: Linux ksh (pdksh-5.2.14-21) versus HPUX 11.0 ksh in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289724#M72205</link>
    <description>Everybody thanks for the replies. Seems we have exploited a bug in the hpux ksh in this particular case so we'll fix the script.&lt;BR /&gt;Judging from your replies we'll probably be ok with the other scripts. I'll doublecheck any scripts using non-triavial echo statements.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Johan</description>
    <pubDate>Tue, 01 Jun 2004 02:16:49 GMT</pubDate>
    <dc:creator>Johan Hoeke</dc:creator>
    <dc:date>2004-06-01T02:16:49Z</dc:date>
    <item>
      <title>Linux ksh (pdksh-5.2.14-21) versus HPUX 11.0 ksh</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289716#M72197</link>
      <description>we're migrating from HPUX 11.0 to RHEL 3.0. Turns out ksh portability is not what I'd hoped for. &lt;BR /&gt;A simple example: &lt;BR /&gt;On our trusty HPUX server using the ksh, assuming you are in /dev:&lt;BR /&gt;if [ -f tty* ]&lt;BR /&gt;then&lt;BR /&gt;   echo file found&lt;BR /&gt;fi&lt;BR /&gt;results in "file found"&lt;BR /&gt;on RHEL 3.0 the result is:&lt;BR /&gt;ksh: [: tty0: unexpected operator/operand&lt;BR /&gt;because the wildcard expands to tty and tty0 etc...&lt;BR /&gt;&lt;BR /&gt;The files the script needs to test for have a date and time extention. (like file.20040528) And there can be one or more than one. Our ksh script on HPUX had no problems with this. The same script on RHEL 3.0 chokes on the if exists if there is more than one file. Ofcourse the script in question can be changed, (any elegant solutions anyone?) &lt;BR /&gt;but I'm worried that I'll run into other incompatibilities in other scripts and I'll have my hands full if I have to test every single script on the box. Any tips?&lt;BR /&gt;</description>
      <pubDate>Fri, 28 May 2004 05:27:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289716#M72197</guid>
      <dc:creator>Johan Hoeke</dc:creator>
      <dc:date>2004-05-28T05:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Linux ksh (pdksh-5.2.14-21) versus HPUX 11.0 ksh</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289717#M72198</link>
      <description>I think the HPUX example you give is a bug.  It should be expanded and it should produce an error.&lt;BR /&gt; &lt;BR /&gt;However, I just tried your code on hpux11.0 and 11i and in both cases, although there was no error, it didn't find the file either.&lt;BR /&gt; &lt;BR /&gt;To be honest, I would really recommend you move away from the korn shell and use either "sh" which is the posix shell on HPUX or bash on Red Hat.  You may need to bite the bullet and make a few script adjustments.&lt;BR /&gt; &lt;BR /&gt;Would this do&lt;BR /&gt; &lt;BR /&gt;ls *.20040528 &amp;gt; /dev/null &amp;amp;&amp;amp; echo "File found"&lt;BR /&gt; &lt;BR /&gt;</description>
      <pubDate>Fri, 28 May 2004 06:30:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289717#M72198</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-05-28T06:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Linux ksh (pdksh-5.2.14-21) versus HPUX 11.0 ksh</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289718#M72199</link>
      <description>Hi Marc,&lt;BR /&gt;&lt;BR /&gt;thanks for your reply. my example was a bit stupid, the files in /dev aren't regular files. so it should be like this:&lt;BR /&gt;ut23 $if [ -f /usr/bin/lp* ]&lt;BR /&gt;&amp;gt; then&lt;BR /&gt;&amp;gt; echo file exists&lt;BR /&gt;&amp;gt; fi&lt;BR /&gt;file exists&lt;BR /&gt;&lt;BR /&gt;actually the script is more like &lt;BR /&gt;if [ -f /somewhere/file.* ]&lt;BR /&gt;then &lt;BR /&gt;   dosomething&lt;BR /&gt;else&lt;BR /&gt;   mail somebody that there aren't any files&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;still annoying that this works on my hpux box w/ the ksh but not on my shiny new linux box with the same shell.&lt;BR /&gt;&lt;BR /&gt;noticed that bash doesn't allow the wildchar there either. so it's not a ksh issue per se and maybe indeed a HPUX ksh bug. Any reactions from the HPUX ksh camp? (if there is such a thing :-) &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 28 May 2004 07:04:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289718#M72199</guid>
      <dc:creator>Johan Hoeke</dc:creator>
      <dc:date>2004-05-28T07:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Linux ksh (pdksh-5.2.14-21) versus HPUX 11.0 ksh</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289719#M72200</link>
      <description>Johan,&lt;BR /&gt;&lt;BR /&gt;I would say it's a bug in HP-UX ksh. Sorry.&lt;BR /&gt;&lt;BR /&gt;'if [ -f .... ]' stands for executing the test command. Test -f expects 1 argument...&lt;BR /&gt;I believe test is a shell built-in.&lt;BR /&gt;/usr/bin/test also rejects multiple filenames.&lt;BR /&gt;&lt;BR /&gt;Another nice difference can be found here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=478229" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=478229&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also expect changes in filenames and locations...&lt;BR /&gt;&lt;BR /&gt;JP</description>
      <pubDate>Fri, 28 May 2004 07:30:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289719#M72200</guid>
      <dc:creator>Jeroen Peereboom</dc:creator>
      <dc:date>2004-05-28T07:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Linux ksh (pdksh-5.2.14-21) versus HPUX 11.0 ksh</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289720#M72201</link>
      <description>Johan,&lt;BR /&gt; &lt;BR /&gt;The korn shell provided with HPUX is not really a supported product.  The korn shell provided with linux isn't that great either.&lt;BR /&gt; &lt;BR /&gt;The default shell on hpux is /bin/sh and although this looks like it might be the Bourne shell, it isn't.  It is the posix shell which is a superset of ksh.  It has all the features of the korn shell (without the bugs) plus more.  &lt;BR /&gt; &lt;BR /&gt;On linux the default is "bash".  It is also a superset of the korn shell and although there are one or two places where I think the bash implementation is not correct, they are small and definately debatable points.&lt;BR /&gt; &lt;BR /&gt;I would really urge you to consider testing your scripts using "bash".  &lt;BR /&gt; &lt;BR /&gt;The one liner in my previouls post will do what you wanted by the way.</description>
      <pubDate>Fri, 28 May 2004 08:32:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289720#M72201</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-05-28T08:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Linux ksh (pdksh-5.2.14-21) versus HPUX 11.0 ksh</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289721#M72202</link>
      <description>I have found most scripts orginating in POSIX and korn shell on HP-UX port very nicely and function well with bash.&lt;BR /&gt;&lt;BR /&gt;The only modification I've had to do is with the echo command.&lt;BR /&gt;&lt;BR /&gt;The korn shell on Linux has been judged by many peers in this forum as "not ready for prime time" and "introducing more problems than it solves."&lt;BR /&gt;&lt;BR /&gt;There are those who like it though. Caveat Emptor.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 28 May 2004 08:37:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289721#M72202</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-05-28T08:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Linux ksh (pdksh-5.2.14-21) versus HPUX 11.0 ksh</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289722#M72203</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;We have a RHEL 2.1 system where our vendor specified that they had to use ksh for their shell scripts.  We objected, as the only ksh we could find was pd-ksh [which comes on the discs from RedHat].  The pd-ksh works but it has some limitations, which you have just tripped across.  There are other limitations to this implementation of ksh.  Check this link:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.cs.mun.ca/~michael/pdksh/NOTES" target="_blank"&gt;http://www.cs.mun.ca/~michael/pdksh/NOTES&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;We pushed back but our vendor insisted on using it, so we finally worked out a deal where the vendor will support any issues with it.&lt;BR /&gt;&lt;BR /&gt;The bash shell seems to be a superset of pd-ksh, so I don't see any reason to use pd-ksh.  As Steven mentioned, about the only change is the 'echo' statements.  I'd much rather run on a shell that is active and supported.  If you check the changelog on the pd-ksh web site, the last version was released in 1999, which doesn't give me a warm feeling for a production system.&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Fri, 28 May 2004 09:13:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289722#M72203</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2004-05-28T09:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: Linux ksh (pdksh-5.2.14-21) versus HPUX 11.0 ksh</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289723#M72204</link>
      <description>pdksh is not finished yet, there are things missing from the shell that the hpux ksh has.&lt;BR /&gt;however some time ago the ksh opened up the source code as well, and you can now get RH packages for it, these are close to 100% compatible. &lt;A href="ftp://dan.drydog.com/pub/linux/ksh93-2000.10.31.0-1.i386.rpm" target="_blank"&gt;ftp://dan.drydog.com/pub/linux/ksh93-2000.10.31.0-1.i386.rpm&lt;/A&gt;</description>
      <pubDate>Tue, 01 Jun 2004 02:10:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289723#M72204</guid>
      <dc:creator>dirk dierickx</dc:creator>
      <dc:date>2004-06-01T02:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Linux ksh (pdksh-5.2.14-21) versus HPUX 11.0 ksh</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289724#M72205</link>
      <description>Everybody thanks for the replies. Seems we have exploited a bug in the hpux ksh in this particular case so we'll fix the script.&lt;BR /&gt;Judging from your replies we'll probably be ok with the other scripts. I'll doublecheck any scripts using non-triavial echo statements.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Johan</description>
      <pubDate>Tue, 01 Jun 2004 02:16:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-ksh-pdksh-5-2-14-21-versus-hpux-11-0-ksh/m-p/3289724#M72205</guid>
      <dc:creator>Johan Hoeke</dc:creator>
      <dc:date>2004-06-01T02:16:49Z</dc:date>
    </item>
  </channel>
</rss>

