<?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 execute if statement via ssh in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/execute-if-statement-via-ssh/m-p/5784569#M638486</link>
    <description>&lt;P&gt;I would like to run an if statement on a remote machine via ssh.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if [ -f /home/user/myfile ]&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;mv&amp;nbsp; /home/user/myfile /tmp/myfile&lt;/P&gt;&lt;P&gt;do&lt;/P&gt;&lt;P&gt;more&lt;/P&gt;&lt;P&gt;stuff&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;do that&lt;/P&gt;&lt;P&gt;fi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can do it if i convert it into a one liner&lt;/P&gt;&lt;P&gt;But I was wondering if there was a better way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Aug 2012 18:42:35 GMT</pubDate>
    <dc:creator>rleon</dc:creator>
    <dc:date>2012-08-29T18:42:35Z</dc:date>
    <item>
      <title>execute if statement via ssh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/execute-if-statement-via-ssh/m-p/5784569#M638486</link>
      <description>&lt;P&gt;I would like to run an if statement on a remote machine via ssh.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if [ -f /home/user/myfile ]&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;mv&amp;nbsp; /home/user/myfile /tmp/myfile&lt;/P&gt;&lt;P&gt;do&lt;/P&gt;&lt;P&gt;more&lt;/P&gt;&lt;P&gt;stuff&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;do that&lt;/P&gt;&lt;P&gt;fi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can do it if i convert it into a one liner&lt;/P&gt;&lt;P&gt;But I was wondering if there was a better way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2012 18:42:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/execute-if-statement-via-ssh/m-p/5784569#M638486</guid>
      <dc:creator>rleon</dc:creator>
      <dc:date>2012-08-29T18:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: execute if statement via ssh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/execute-if-statement-via-ssh/m-p/5784601#M638487</link>
      <description>&lt;P&gt;&amp;gt;I would like to run an if statement on a remote machine via ssh.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could just copy the script there and run that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;I can do it if I convert it into a one liner&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes that works.&lt;/P&gt;&lt;P&gt;Or you could redirect stdin with a here doc and include the commands.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2012 18:59:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/execute-if-statement-via-ssh/m-p/5784601#M638487</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-08-29T18:59:45Z</dc:date>
    </item>
  </channel>
</rss>

