<?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: dtksh vs ksh behavior in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/dtksh-vs-ksh-behavior/m-p/4779178#M640872</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Two comments.  The HP 'ksh' shell is a Korn88 shell whereas the 'dtksh' is based on Korn93.  This is true at least the last time I looked.&lt;BR /&gt;&lt;BR /&gt;Secondly, you would be advised to add '-n' to your remote command:&lt;BR /&gt;&lt;BR /&gt;# ssh -n $nm uname -r&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Tue, 19 Apr 2011 13:23:31 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2011-04-19T13:23:31Z</dc:date>
    <item>
      <title>dtksh vs ksh behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dtksh-vs-ksh-behavior/m-p/4779176#M640870</link>
      <description>The following script loop sequence works with dtksh but exits after one iteration with /usr/bin/ksh.  Any thoughts&lt;BR /&gt;&lt;BR /&gt;#!/usr/dt/bin/dtksh&lt;BR /&gt;cat /usr/local/prod/data/prod_hp_server_list.txt|while read nm&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;if [[ "B.11.31" != "$(ssh $nm uname -r)" ]]&lt;BR /&gt;then&lt;BR /&gt;   echo "Host $nm is $(ssh $nm uname -r)"&lt;BR /&gt;else&lt;BR /&gt;   echo "Host $nm is 31"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Apr 2011 13:06:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dtksh-vs-ksh-behavior/m-p/4779176#M640870</guid>
      <dc:creator>gdemers</dc:creator>
      <dc:date>2011-04-19T13:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: dtksh vs ksh behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dtksh-vs-ksh-behavior/m-p/4779177#M640871</link>
      <description>&lt;!--!*#--&gt;I don't know why the two shells work&lt;BR /&gt;differently, but one thing I wouldn't do in&lt;BR /&gt;my script is run the "ssh" job twice to get&lt;BR /&gt;the same result in two places.&lt;BR /&gt;&lt;BR /&gt;    rem_ver="$(ssh $nm uname -r)"&lt;BR /&gt;&lt;BR /&gt;Then test and/or display "rem_ver".&lt;BR /&gt;&lt;BR /&gt;I don't know if it would help, but you might&lt;BR /&gt;try something more like:&lt;BR /&gt;&lt;BR /&gt;(&lt;BR /&gt;while read nm&lt;BR /&gt;[...]&lt;BR /&gt;) &amp;lt; /.../prod_hp_server_list.txt&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Apr 2011 13:22:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dtksh-vs-ksh-behavior/m-p/4779177#M640871</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2011-04-19T13:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: dtksh vs ksh behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dtksh-vs-ksh-behavior/m-p/4779178#M640872</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Two comments.  The HP 'ksh' shell is a Korn88 shell whereas the 'dtksh' is based on Korn93.  This is true at least the last time I looked.&lt;BR /&gt;&lt;BR /&gt;Secondly, you would be advised to add '-n' to your remote command:&lt;BR /&gt;&lt;BR /&gt;# ssh -n $nm uname -r&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 19 Apr 2011 13:23:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dtksh-vs-ksh-behavior/m-p/4779178#M640872</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-04-19T13:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: dtksh vs ksh behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dtksh-vs-ksh-behavior/m-p/4779179#M640873</link>
      <description>I agree with your suggestions but neither explains the behavior.  I believe that code snippet should work with ksh88.</description>
      <pubDate>Tue, 19 Apr 2011 13:45:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dtksh-vs-ksh-behavior/m-p/4779179#M640873</guid>
      <dc:creator>gdemers</dc:creator>
      <dc:date>2011-04-19T13:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: dtksh vs ksh behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dtksh-vs-ksh-behavior/m-p/4779180#M640874</link>
      <description>in my experience, this, i.e., ssh into a remote server while looping through the server names in a `while read` command, never worked.&lt;BR /&gt;&lt;BR /&gt;something strange happens to the read buffers when you remote ssh into a server and come back to the same shell. I can not think of any reason why but as if, when you go out to the remote system, your local read buffers get flushed out. Hence when you return, there is nothing in the buffer to loop through. No logical explanation though.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Apr 2011 15:14:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dtksh-vs-ksh-behavior/m-p/4779180#M640874</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2011-04-19T15:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: dtksh vs ksh behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dtksh-vs-ksh-behavior/m-p/4779181#M640875</link>
      <description>Works for me with the -n option in ssh as pointed out by JRF&lt;BR /&gt;&lt;BR /&gt;if [[ "B.11.31" != "$(ssh $nm -n "uname -r")" ]]&lt;BR /&gt;&lt;BR /&gt;pitt20-/root/mfs: r .&lt;BR /&gt;./mfs&lt;BR /&gt;Host fxgip34 is 31&lt;BR /&gt;Host fxgip35 is 31&lt;BR /&gt;Host fxgip36 is 31&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Apr 2011 15:26:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dtksh-vs-ksh-behavior/m-p/4779181#M640875</guid>
      <dc:creator>Michael Steele_2</dc:creator>
      <dc:date>2011-04-19T15:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: dtksh vs ksh behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dtksh-vs-ksh-behavior/m-p/4779182#M640876</link>
      <description>I have assigned points to   5  of   25  responses&lt;BR /&gt;&lt;BR /&gt;Could you make sure you're assigning points to resposnes as indicated in the rules of the forum&lt;BR /&gt;&lt;BR /&gt;thanks</description>
      <pubDate>Tue, 19 Apr 2011 18:21:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dtksh-vs-ksh-behavior/m-p/4779182#M640876</guid>
      <dc:creator>Michael Steele_2</dc:creator>
      <dc:date>2011-04-19T18:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: dtksh vs ksh behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dtksh-vs-ksh-behavior/m-p/4779183#M640877</link>
      <description>BTW, I would speculate to say that you don't have a shell to shell problem but a ssh version to ssh version problem.</description>
      <pubDate>Wed, 20 Apr 2011 18:20:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dtksh-vs-ksh-behavior/m-p/4779183#M640877</guid>
      <dc:creator>Michael Steele_2</dc:creator>
      <dc:date>2011-04-20T18:20:07Z</dc:date>
    </item>
  </channel>
</rss>

