<?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: find help! (rename) in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/find-help/m-p/5497583#M640122</link>
    <description>&lt;P&gt;&amp;gt;How can I do this using find/xargs to rename (increment the second sequence by 1).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Forget about xargs.&amp;nbsp; Try:&lt;/P&gt;&lt;P&gt;find . -name "002*" -print | awk '&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;save = "\"" $0 "\""&lt;/P&gt;&lt;P&gt;$2 = sprintf("%03d", $2+1)&lt;/P&gt;&lt;P&gt;new = "\"" $0 "\""&lt;/P&gt;&lt;P&gt;print "mv", save, new&lt;/P&gt;&lt;P&gt;}'&amp;nbsp; |&amp;nbsp; sh&lt;/P&gt;</description>
    <pubDate>Tue, 17 Jan 2012 01:44:33 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2012-01-17T01:44:33Z</dc:date>
    <item>
      <title>find help!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-help/m-p/5497573#M640121</link>
      <description>&lt;P&gt;Hi All!&lt;BR /&gt;&lt;BR /&gt;I have a list of directories&lt;BR /&gt;&lt;BR /&gt;./"002 000 jack"/&lt;BR /&gt;./"002 001 black"/&lt;BR /&gt;./"002 002 white"/&lt;BR /&gt;./"002 003 orange"/&lt;BR /&gt;&lt;BR /&gt;mv "002 000 jack" "`echo "002 000 jack" | awk '{$2 = sprintf("%03d",$2+1); print;}'`"&lt;BR /&gt;&lt;BR /&gt;# the result is:&lt;BR /&gt;mv "002 000 jack" "002 001 jack"&lt;BR /&gt;&lt;BR /&gt;I have been struggling to do this through find/xargs combination.&lt;BR /&gt;&lt;BR /&gt;find . -name "002*" -print0 …&lt;BR /&gt;&lt;BR /&gt;How can I do this using find/xargs to rename( increment the second sequence by 1).&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Allan.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2012 19:55:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-help/m-p/5497573#M640121</guid>
      <dc:creator>allanm77</dc:creator>
      <dc:date>2012-01-16T19:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: find help! (rename)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-help/m-p/5497583#M640122</link>
      <description>&lt;P&gt;&amp;gt;How can I do this using find/xargs to rename (increment the second sequence by 1).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Forget about xargs.&amp;nbsp; Try:&lt;/P&gt;&lt;P&gt;find . -name "002*" -print | awk '&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;save = "\"" $0 "\""&lt;/P&gt;&lt;P&gt;$2 = sprintf("%03d", $2+1)&lt;/P&gt;&lt;P&gt;new = "\"" $0 "\""&lt;/P&gt;&lt;P&gt;print "mv", save, new&lt;/P&gt;&lt;P&gt;}'&amp;nbsp; |&amp;nbsp; sh&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2012 01:44:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-help/m-p/5497583#M640122</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-01-17T01:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: find help! (rename)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-help/m-p/5497869#M640123</link>
      <description>Thanks Dennis!</description>
      <pubDate>Mon, 16 Jan 2012 21:52:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-help/m-p/5497869#M640123</guid>
      <dc:creator>allanm77</dc:creator>
      <dc:date>2012-01-16T21:52:22Z</dc:date>
    </item>
  </channel>
</rss>

