<?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: shell script help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scrpt-help/m-p/5756237#M638428</link>
    <description>&lt;P&gt;Where are you moving it to?&amp;nbsp; The same filesystem?&lt;/P&gt;&lt;P&gt;If the same, then move all files and then move nas and file2 back.&amp;nbsp; If doing a copy, this would be too expensive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a real shell you can also do:&lt;/P&gt;&lt;P&gt;mv !(nas|file2) target/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, try an echo to make sure it does what you want.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Aug 2012 22:35:59 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2012-08-08T22:35:59Z</dc:date>
    <item>
      <title>shell scrpt help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scrpt-help/m-p/5756169#M638427</link>
      <description>&lt;P&gt;$pwd&lt;BR /&gt;$/home/rajesh&lt;BR /&gt;$cd data1&lt;/P&gt;&lt;P&gt;$pwd&lt;/P&gt;&lt;P&gt;$/home/rajesh/data1&lt;BR /&gt;$ls&lt;BR /&gt;fa00 fa02 fa03 fa04 fa05 fa06 fa07 fa08 fa09 fa10 fa11 fa12 fa13 fa15 fa16&lt;BR /&gt;fa17 fa18 nas file2 fa18 fa19 fa20 fa21 fa22 fa23 fa24 fa25 fa26 fa27 fa28 fa29&lt;/P&gt;&lt;P&gt;fa 30 fa31 fa32 fa33 fa34 fa35 fa36&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;$&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we need to write one script for mv command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we need to move all file files and folser under the /home/rajesh/data1 , except nas and file2 folders&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how to write the script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help me&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2012 06:58:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scrpt-help/m-p/5756169#M638427</guid>
      <dc:creator>rajesh73</dc:creator>
      <dc:date>2012-08-08T06:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: shell script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scrpt-help/m-p/5756237#M638428</link>
      <description>&lt;P&gt;Where are you moving it to?&amp;nbsp; The same filesystem?&lt;/P&gt;&lt;P&gt;If the same, then move all files and then move nas and file2 back.&amp;nbsp; If doing a copy, this would be too expensive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a real shell you can also do:&lt;/P&gt;&lt;P&gt;mv !(nas|file2) target/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, try an echo to make sure it does what you want.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2012 22:35:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scrpt-help/m-p/5756237#M638428</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-08-08T22:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: shell script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scrpt-help/m-p/5756487#M638429</link>
      <description>&lt;P&gt;hi dennis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thnaks for providing the details.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but now user request to delete the all files expect nas&amp;amp;file2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pls help me&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2012 09:18:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scrpt-help/m-p/5756487#M638429</guid>
      <dc:creator>rajesh73</dc:creator>
      <dc:date>2012-08-08T09:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: shell script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scrpt-help/m-p/5757013#M638430</link>
      <description>&lt;P&gt;Something like this should work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# cat mv-files.sh&lt;/P&gt;&lt;P&gt;#!/usr/bin/sh&lt;/P&gt;&lt;P&gt;cd /home/rajesh/data1&lt;/P&gt;&lt;P&gt;DATAFILES=$(ls -1 |grep -v -e nas -e file2)&lt;/P&gt;&lt;P&gt;mv ${DATAFILES} /new/dir&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2012 13:56:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scrpt-help/m-p/5757013#M638430</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2012-08-08T13:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: shell script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scrpt-help/m-p/5757241#M638431</link>
      <description>&lt;P&gt;&amp;gt;now user request to delete the all files except nas &amp;amp; file2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just replace "mv" by "rm -rf".&amp;nbsp; Check it with echo first.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2012 17:19:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scrpt-help/m-p/5757241#M638431</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-08-08T17:19:49Z</dc:date>
    </item>
  </channel>
</rss>

