<?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: need some scripting help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/need-some-scripting-help/m-p/3413206#M202859</link>
    <description>Hi Mark,&lt;BR /&gt; &lt;BR /&gt; You can try something like this&lt;BR /&gt;&lt;BR /&gt; # vi /usr/local/bin/flist&lt;BR /&gt; /source/dir/file1&lt;BR /&gt; /source/dir/file2&lt;BR /&gt; /source/dir/file3&lt;BR /&gt; #&lt;BR /&gt; # export TARGET_DIR=/target/dir&lt;BR /&gt; # FAILED=0&lt;BR /&gt; # for FILE_NAME in $(cat /usr/local/bin/flist)&lt;BR /&gt; do&lt;BR /&gt;   mv $FILE_NAME $TARGET_DIR/&lt;BR /&gt;   [ $? -ne 0 ] &amp;amp;&amp;amp; FAILED=1&lt;BR /&gt; done&lt;BR /&gt; #&lt;BR /&gt; # [ $FAILED -eq 0 ] &amp;amp;&amp;amp; echo "Move successful" || echo "Move unsuccessful"</description>
    <pubDate>Tue, 02 Nov 2004 14:44:11 GMT</pubDate>
    <dc:creator>Sundar_7</dc:creator>
    <dc:date>2004-11-02T14:44:11Z</dc:date>
    <item>
      <title>need some scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-some-scripting-help/m-p/3413205#M202858</link>
      <description>i need a simple script to read a file that contains one field.  The field is a list of files in a directory.  As i read in these files..i want to move each one to a different directory.  Sure this is easy..but my scripting knowledge is zilch...&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Nov 2004 14:28:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-some-scripting-help/m-p/3413205#M202858</guid>
      <dc:creator>Mark Harshman_1</dc:creator>
      <dc:date>2004-11-02T14:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: need some scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-some-scripting-help/m-p/3413206#M202859</link>
      <description>Hi Mark,&lt;BR /&gt; &lt;BR /&gt; You can try something like this&lt;BR /&gt;&lt;BR /&gt; # vi /usr/local/bin/flist&lt;BR /&gt; /source/dir/file1&lt;BR /&gt; /source/dir/file2&lt;BR /&gt; /source/dir/file3&lt;BR /&gt; #&lt;BR /&gt; # export TARGET_DIR=/target/dir&lt;BR /&gt; # FAILED=0&lt;BR /&gt; # for FILE_NAME in $(cat /usr/local/bin/flist)&lt;BR /&gt; do&lt;BR /&gt;   mv $FILE_NAME $TARGET_DIR/&lt;BR /&gt;   [ $? -ne 0 ] &amp;amp;&amp;amp; FAILED=1&lt;BR /&gt; done&lt;BR /&gt; #&lt;BR /&gt; # [ $FAILED -eq 0 ] &amp;amp;&amp;amp; echo "Move successful" || echo "Move unsuccessful"</description>
      <pubDate>Tue, 02 Nov 2004 14:44:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-some-scripting-help/m-p/3413206#M202859</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2004-11-02T14:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: need some scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-some-scripting-help/m-p/3413207#M202860</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Is this what you want to do.&lt;BR /&gt;&lt;BR /&gt;source_dir=/test&lt;BR /&gt;dest_dir=/test&lt;BR /&gt;all files in /test that has *.org extn, you want to move to /test1.&lt;BR /&gt;&lt;BR /&gt;you can do this from the command line&lt;BR /&gt;&lt;BR /&gt;pwd&lt;BR /&gt;/test&lt;BR /&gt;# for i in `ls -l *.org |awk '{print $9}'`&lt;BR /&gt;&amp;gt;do&lt;BR /&gt;&amp;gt;mv $i /test1&lt;BR /&gt;&amp;gt;done&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Nov 2004 14:47:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-some-scripting-help/m-p/3413207#M202860</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2004-11-02T14:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: need some scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-some-scripting-help/m-p/3413208#M202861</link>
      <description>Possible improvement in efficiency&lt;BR /&gt;&lt;BR /&gt;Change:&lt;BR /&gt;for i in `ls -l *.org |awk '{print $9}'`&lt;BR /&gt;&lt;BR /&gt;to&lt;BR /&gt;&lt;BR /&gt;for i in `ls -1 *.org`&lt;BR /&gt;&lt;BR /&gt;Changes ls -l "el" &lt;BR /&gt;&lt;BR /&gt;to ls -1 "one"&lt;BR /&gt;&lt;BR /&gt;Saves the awk processing. Probably a meaningless improvement.&lt;BR /&gt;&lt;BR /&gt;Nice job itrc colleagues.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 02 Nov 2004 14:57:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-some-scripting-help/m-p/3413208#M202861</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-11-02T14:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: need some scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-some-scripting-help/m-p/3413209#M202862</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Hope I understand you correct. You have a list of files, all in the same directory and want to move to a different directory.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;while read file&lt;BR /&gt;do&lt;BR /&gt;mv $file /&lt;DEST_DIR&gt;/$(basename $file)&lt;BR /&gt;done &lt;/DEST_DIR&gt;</description>
      <pubDate>Tue, 02 Nov 2004 15:36:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-some-scripting-help/m-p/3413209#M202862</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2004-11-02T15:36:28Z</dc:date>
    </item>
  </channel>
</rss>

