<?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: file move in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/file-move/m-p/6410438#M54549</link>
    <description>&lt;P&gt;Where are you setting 'i' ?&lt;/P&gt;</description>
    <pubDate>Wed, 12 Mar 2014 16:28:38 GMT</pubDate>
    <dc:creator>RJHall</dc:creator>
    <dc:date>2014-03-12T16:28:38Z</dc:date>
    <item>
      <title>file move</title>
      <link>https://community.hpe.com/t5/operating-system-linux/file-move/m-p/6410362#M54548</link>
      <description>&lt;P&gt;for HOST in `cat /tmp/newhostdetails.txt`&amp;nbsp;&amp;nbsp;&amp;nbsp; -- #since i am running from other OS ,I used evil cat.&lt;BR /&gt;do&lt;BR /&gt;echo $HOST&lt;BR /&gt;echo "#########"&lt;BR /&gt;ssh -q -o ConnectTimeout=60 user@$HOST ls -l /tmp/*.02.19.2014.output.tar.gz&lt;BR /&gt;if [ $? -ne 0 ]; then&lt;BR /&gt;echo "host $HOST not responding"&lt;BR /&gt;STAT="*file not available*"&lt;BR /&gt;else&lt;BR /&gt;echo "host $HOST responding"&lt;BR /&gt;STAT="*file available*"&lt;BR /&gt;scp -p user@$i:/tmp/*.02.19.2014.output.tar.gz /tmp/deout&lt;BR /&gt;if [ $? -ne 0 ]; then&lt;BR /&gt;echo "tar output not colletced"&lt;BR /&gt;TARSTAT="*not collected*"&lt;BR /&gt;else&lt;BR /&gt;echo "tar output collected"&lt;BR /&gt;TARSTAT="collected"&lt;BR /&gt;fi&lt;BR /&gt;echo&amp;nbsp; "|${HOST} ${STAT} ${TARSTAT}|" &amp;gt;&amp;gt; /tmp/deoliteoutput.txt&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;------------------&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using the above script to check *.02.19.2014.output.tar.gz.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if file name "*.02.19.2014.output.tar.gz" exists it has to scp the file to /tmp/deout.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but i am getting the error at scp -p user@$i:/tmp/*.02.19.2014.output.tar.gz /tmp/deout&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$i is not read at line scp -p user@$i:/tmp/*.02.19.2014.output.tar.gz /tmp/deout.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. This thread has been moved from&amp;nbsp;&lt;SPAN style="line-height: 15px;"&gt;HP-UX&amp;gt;Languages and Scripting to LInux &amp;gt; sysadmin&lt;/SPAN&gt;&lt;SPAN style="line-height: 15px;"&gt;. -HP Forum Moderator&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2014 03:25:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/file-move/m-p/6410362#M54548</guid>
      <dc:creator>tempsample</dc:creator>
      <dc:date>2014-03-13T03:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: file move</title>
      <link>https://community.hpe.com/t5/operating-system-linux/file-move/m-p/6410438#M54549</link>
      <description>&lt;P&gt;Where are you setting 'i' ?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 16:28:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/file-move/m-p/6410438#M54549</guid>
      <dc:creator>RJHall</dc:creator>
      <dc:date>2014-03-12T16:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: file move</title>
      <link>https://community.hpe.com/t5/operating-system-linux/file-move/m-p/6410590#M54550</link>
      <description>&lt;P&gt;You say "for HOST in ..." but then use $i in your SCP / SSH commands. &amp;nbsp;You should probably use $HOST&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 18:18:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/file-move/m-p/6410590#M54550</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2014-03-12T18:18:21Z</dc:date>
    </item>
  </channel>
</rss>

