<?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: script to rename multiple file names in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-rename-multiple-file-names/m-p/4304814#M338512</link>
    <description>Or,&lt;BR /&gt;&lt;BR /&gt;for i in $(ls)&lt;BR /&gt;do&lt;BR /&gt;   mv $i ${i%%;1}1&lt;BR /&gt;done</description>
    <pubDate>Wed, 12 Nov 2008 15:58:15 GMT</pubDate>
    <dc:creator>Tingli</dc:creator>
    <dc:date>2008-11-12T15:58:15Z</dc:date>
    <item>
      <title>script to rename multiple file names</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-rename-multiple-file-names/m-p/4304810#M338508</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have a directory which has filenames with extension .amt;1 (e.g one file name is sgho11.amt;1 and another filename is sgho12.amt;1). Can you please let me know how can I rename all the files with extension .amt1.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;Gab</description>
      <pubDate>Wed, 12 Nov 2008 10:36:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-rename-multiple-file-names/m-p/4304810#M338508</guid>
      <dc:creator>gab_in</dc:creator>
      <dc:date>2008-11-12T10:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: script to rename multiple file names</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-rename-multiple-file-names/m-p/4304811#M338509</link>
      <description>Shalom Gab,&lt;BR /&gt;&lt;BR /&gt;Side note: Looks like wherever you got these files you didn't mount the media properly.&lt;BR /&gt;&lt;BR /&gt;I'm not sure after the rename you will have usable files. It might be better to properly mount the media and copy the files to disk properly.&lt;BR /&gt;&lt;BR /&gt;ls -1 &amp;gt; list&lt;BR /&gt;&lt;BR /&gt;while read -r fn&lt;BR /&gt;do&lt;BR /&gt;  # add a line to calculate the new name.&lt;BR /&gt;  mv $fn $newname&lt;BR /&gt;done &amp;lt; list</description>
      <pubDate>Wed, 12 Nov 2008 11:23:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-rename-multiple-file-names/m-p/4304811#M338509</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2008-11-12T11:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: script to rename multiple file names</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-rename-multiple-file-names/m-p/4304812#M338510</link>
      <description>&amp;gt;SEP: mv $fn $newname&lt;BR /&gt;&lt;BR /&gt;You are going to have to quote $fn since it has a ";":&lt;BR /&gt;mv "$fn" $newname&lt;BR /&gt;&lt;BR /&gt;Some threads to compute $newname:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1261895" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1261895&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=218443" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=218443&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=938720" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=938720&lt;/A&gt;</description>
      <pubDate>Wed, 12 Nov 2008 12:51:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-rename-multiple-file-names/m-p/4304812#M338510</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-11-12T12:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: script to rename multiple file names</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-rename-multiple-file-names/m-p/4304813#M338511</link>
      <description>Hi Gab,&lt;BR /&gt;&lt;BR /&gt;Please try below.&lt;BR /&gt;&lt;BR /&gt;for file in `ls -1`&lt;BR /&gt;&amp;gt; do&lt;BR /&gt;&amp;gt; mv $file `echo $i|awk -F. '{print $1}'`.amt1&lt;BR /&gt;&amp;gt; done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks &lt;BR /&gt;Sen</description>
      <pubDate>Wed, 12 Nov 2008 13:39:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-rename-multiple-file-names/m-p/4304813#M338511</guid>
      <dc:creator>sen_ux</dc:creator>
      <dc:date>2008-11-12T13:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: script to rename multiple file names</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-rename-multiple-file-names/m-p/4304814#M338512</link>
      <description>Or,&lt;BR /&gt;&lt;BR /&gt;for i in $(ls)&lt;BR /&gt;do&lt;BR /&gt;   mv $i ${i%%;1}1&lt;BR /&gt;done</description>
      <pubDate>Wed, 12 Nov 2008 15:58:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-rename-multiple-file-names/m-p/4304814#M338512</guid>
      <dc:creator>Tingli</dc:creator>
      <dc:date>2008-11-12T15:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: script to rename multiple file names</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-to-rename-multiple-file-names/m-p/4304815#M338513</link>
      <description>&amp;gt;ME: You are going to have to quote $fn since it has a ";":&lt;BR /&gt;&lt;BR /&gt;Oops, it appears the shell scans for ";" before it does parm substitution.  So only whitespace needs to be quoted.</description>
      <pubDate>Wed, 12 Nov 2008 21:52:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-to-rename-multiple-file-names/m-p/4304815#M338513</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-11-12T21:52:08Z</dc:date>
    </item>
  </channel>
</rss>

