<?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: remsh remote  directory exist test in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/remsh-remote-directory-exist-test/m-p/3530473#M559296</link>
    <description>&lt;BR /&gt;I am a newbie in scripting.&lt;BR /&gt;But, after I put it in script, it always abort, when 1 come up, it should not execute "then ...fi" block, but &lt;BR /&gt;&lt;BR /&gt;for m in `cat $FILENAME"1"`&lt;BR /&gt;do&lt;BR /&gt;if  remsh ctcyborg 'test ! -d /home/blu/rvelez; echo $?'&lt;BR /&gt;then&lt;BR /&gt;echo " there is no /home/blu/rvelez directory in ctcyborg, ABORT"&lt;BR /&gt;exit 1&lt;BR /&gt;fi&lt;BR /&gt;rcp -p /home/blu/$m ctcyborg:/home/blu/rvelez/$m&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;output below with first line -x option&lt;BR /&gt;&lt;BR /&gt;+ remsh ctcyborg test ! -d /home/blu/rvelez; echo $?&lt;BR /&gt;1&lt;BR /&gt;+ echo  there is no /home/blu/rvelez directory in ctcyborg, ABORT&lt;BR /&gt; there is no /home/blu/rvelez directory in ctcyborg, ABORT&lt;BR /&gt;+ exit 1&lt;BR /&gt;&lt;BR /&gt;This happened when there is a /home/blu/rvelez directory in ctcyborg server.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 22 Apr 2005 19:16:05 GMT</pubDate>
    <dc:creator>bin lu_1</dc:creator>
    <dc:date>2005-04-22T19:16:05Z</dc:date>
    <item>
      <title>remsh remote  directory exist test</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remsh-remote-directory-exist-test/m-p/3530470#M559293</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;My problem is test a directory exist or not&lt;BR /&gt; &lt;BR /&gt;In a remote (name ctcyborg) server , I could test directory locally.&lt;BR /&gt;&lt;BR /&gt;# test -d /home/blu/rvele  (a not exist directory)&lt;BR /&gt;# echo $?&lt;BR /&gt;1&lt;BR /&gt;# test -d /home/blu/rvelez&lt;BR /&gt;# echo $?&lt;BR /&gt;0&lt;BR /&gt;# test ! -d /home/blu/rvelez&lt;BR /&gt;# echo $?&lt;BR /&gt;1&lt;BR /&gt;&lt;BR /&gt;But in peer remote server to ctcyborg, I could not get expected result.&lt;BR /&gt;&lt;BR /&gt;# remsh ctcyborg test -d /home/blu/rvelez&lt;BR /&gt;# echo $?&lt;BR /&gt;0&lt;BR /&gt;# remsh ctcyborg test ! -d /home/blu/rvelez&lt;BR /&gt;# echo $?&lt;BR /&gt;0&lt;BR /&gt;&lt;BR /&gt;As we promote files from dev machine to production machine. A script could make us operation less-error in typo. &lt;BR /&gt;We have to verify the directory exist in remote machine first, then rcp files over.&lt;BR /&gt;&lt;BR /&gt;I could  test a remote server directory exist or not. As my following script always abort, even the remote directory exit.&lt;BR /&gt;&lt;BR /&gt;if  remsh ctcyborg test ! -d /home/blu/rvelez&lt;BR /&gt;then&lt;BR /&gt;echo " there is no /home/blu/rvelez directory in ctcyborg, ABORT"&lt;BR /&gt;exit 1&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Apr 2005 16:47:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remsh-remote-directory-exist-test/m-p/3530470#M559293</guid>
      <dc:creator>bin lu_1</dc:creator>
      <dc:date>2005-04-22T16:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: remsh remote  directory exist test</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remsh-remote-directory-exist-test/m-p/3530471#M559294</link>
      <description>That is return status of remsh command. you need to to as follows.&lt;BR /&gt;&lt;BR /&gt;remsh ctcyborg 'test ! -d /home/blu/rvelez;echo $?'&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Fri, 22 Apr 2005 16:55:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remsh-remote-directory-exist-test/m-p/3530471#M559294</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-04-22T16:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: remsh remote  directory exist test</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remsh-remote-directory-exist-test/m-p/3530472#M559295</link>
      <description>Anil,&lt;BR /&gt;&lt;BR /&gt;It is great, As I spent alot other combinations. they all do not work today. I got what I expected from you.&lt;BR /&gt;&lt;BR /&gt;# remsh ctcyborg 'test ! -d /home/blu/rvelez; echo $?'&lt;BR /&gt;1&lt;BR /&gt;# remsh ctcyborg 'test  -d /home/blu/rvelez; echo $?'&lt;BR /&gt;0&lt;BR /&gt;&lt;BR /&gt;Thanks a lot&lt;BR /&gt;Bin</description>
      <pubDate>Fri, 22 Apr 2005 18:32:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remsh-remote-directory-exist-test/m-p/3530472#M559295</guid>
      <dc:creator>bin lu_1</dc:creator>
      <dc:date>2005-04-22T18:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: remsh remote  directory exist test</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remsh-remote-directory-exist-test/m-p/3530473#M559296</link>
      <description>&lt;BR /&gt;I am a newbie in scripting.&lt;BR /&gt;But, after I put it in script, it always abort, when 1 come up, it should not execute "then ...fi" block, but &lt;BR /&gt;&lt;BR /&gt;for m in `cat $FILENAME"1"`&lt;BR /&gt;do&lt;BR /&gt;if  remsh ctcyborg 'test ! -d /home/blu/rvelez; echo $?'&lt;BR /&gt;then&lt;BR /&gt;echo " there is no /home/blu/rvelez directory in ctcyborg, ABORT"&lt;BR /&gt;exit 1&lt;BR /&gt;fi&lt;BR /&gt;rcp -p /home/blu/$m ctcyborg:/home/blu/rvelez/$m&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;output below with first line -x option&lt;BR /&gt;&lt;BR /&gt;+ remsh ctcyborg test ! -d /home/blu/rvelez; echo $?&lt;BR /&gt;1&lt;BR /&gt;+ echo  there is no /home/blu/rvelez directory in ctcyborg, ABORT&lt;BR /&gt; there is no /home/blu/rvelez directory in ctcyborg, ABORT&lt;BR /&gt;+ exit 1&lt;BR /&gt;&lt;BR /&gt;This happened when there is a /home/blu/rvelez directory in ctcyborg server.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Apr 2005 19:16:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remsh-remote-directory-exist-test/m-p/3530473#M559296</guid>
      <dc:creator>bin lu_1</dc:creator>
      <dc:date>2005-04-22T19:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: remsh remote  directory exist test</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remsh-remote-directory-exist-test/m-p/3530474#M559297</link>
      <description>That's because remsh command still returns &lt;BR /&gt;success even if the directory does not exists. You&lt;BR /&gt;need to catch the 'echo $?' part in the remsh &lt;BR /&gt;command see if it's zero. Change the script to &lt;BR /&gt;following:&lt;BR /&gt;-------&lt;BR /&gt;for m in `cat $FILENAME"1"`&lt;BR /&gt;do&lt;BR /&gt;tmp=$(remsh ctcyborg 'test ! -d /home/blu/rvelez; echo $?')&lt;BR /&gt;if [ $tmp -eq 0 ]&lt;BR /&gt;then&lt;BR /&gt;echo " there is no /home/blu/rvelez directory in ctcyborg, ABORT"&lt;BR /&gt;exit 1&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Apr 2005 19:27:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remsh-remote-directory-exist-test/m-p/3530474#M559297</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-04-22T19:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: remsh remote  directory exist test</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remsh-remote-directory-exist-test/m-p/3530475#M559298</link>
      <description>Biswajit,&lt;BR /&gt;&lt;BR /&gt;Your point makes the script behaviour on the track. Then it brought my  question to the end. &lt;BR /&gt;&lt;BR /&gt;Thank you very much,&lt;BR /&gt;&lt;BR /&gt;Bin</description>
      <pubDate>Fri, 22 Apr 2005 20:18:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remsh-remote-directory-exist-test/m-p/3530475#M559298</guid>
      <dc:creator>bin lu_1</dc:creator>
      <dc:date>2005-04-22T20:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: remsh remote  directory exist test</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remsh-remote-directory-exist-test/m-p/3530476#M559299</link>
      <description>Seems u got the answer.... Where are the points...</description>
      <pubDate>Mon, 25 Apr 2005 07:00:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remsh-remote-directory-exist-test/m-p/3530476#M559299</guid>
      <dc:creator>Suraj Singh_1</dc:creator>
      <dc:date>2005-04-25T07:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: remsh remote  directory exist test</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remsh-remote-directory-exist-test/m-p/3530477#M559300</link>
      <description>Thank you all here involve this topic, it was my first created thread here. I just submitted the points which I did not pay attention before. &lt;BR /&gt;&lt;BR /&gt;Now, I know how I should do here.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 03 May 2005 08:02:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remsh-remote-directory-exist-test/m-p/3530477#M559300</guid>
      <dc:creator>bin lu_1</dc:creator>
      <dc:date>2005-05-03T08:02:11Z</dc:date>
    </item>
  </channel>
</rss>

