<?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: altering file name in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/altering-file-name/m-p/4937345#M69313</link>
    <description>Solution was provided.</description>
    <pubDate>Sun, 30 Oct 2005 11:06:20 GMT</pubDate>
    <dc:creator>Shaf_1</dc:creator>
    <dc:date>2005-10-30T11:06:20Z</dc:date>
    <item>
      <title>altering file name</title>
      <link>https://community.hpe.com/t5/operating-system-linux/altering-file-name/m-p/4937343#M69311</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have a number of files that I need to alter the file name.  The current file names are similar to  this:&lt;BR /&gt;&lt;BR /&gt;XYZ8976&lt;BR /&gt;XYZ7654&lt;BR /&gt;XYZ8765&lt;BR /&gt;&lt;BR /&gt;What I want to do is put a underscore (_) after the charater 'Z' so I would want the files names to look like this:&lt;BR /&gt;&lt;BR /&gt;XYZ_8976&lt;BR /&gt;XYZ_7654&lt;BR /&gt;XYZ_8765&lt;BR /&gt;&lt;BR /&gt;How could I do this in UNIX?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Shaf</description>
      <pubDate>Sat, 29 Oct 2005 23:58:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/altering-file-name/m-p/4937343#M69311</guid>
      <dc:creator>Shaf_1</dc:creator>
      <dc:date>2005-10-29T23:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: altering file name</title>
      <link>https://community.hpe.com/t5/operating-system-linux/altering-file-name/m-p/4937344#M69312</link>
      <description>if all the files are in the same folder and begin with XYZ the following perl script will do the work,copy it to a file and execute "perl filename".Define the actual folder with XYZ files instead $folder:&lt;BR /&gt;chdir $folder;&lt;BR /&gt;foreach my $file (glob "XYZ*") {&lt;BR /&gt;  my $newfile = $file;&lt;BR /&gt;  $newfile =~ s/^XYZ/XYZ_/;&lt;BR /&gt;  if (-e $newfile) &lt;BR /&gt;  {&lt;BR /&gt;    warn "can't rename $file to $newfile: $newfile exists\n";&lt;BR /&gt;  } &lt;BR /&gt;  else&lt;BR /&gt;  {&lt;BR /&gt;      rename $file, $newfile) &lt;BR /&gt;  }&lt;BR /&gt;}&lt;BR /&gt;</description>
      <pubDate>Sun, 30 Oct 2005 03:52:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/altering-file-name/m-p/4937344#M69312</guid>
      <dc:creator>Alexander Chuzhoy</dc:creator>
      <dc:date>2005-10-30T03:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: altering file name</title>
      <link>https://community.hpe.com/t5/operating-system-linux/altering-file-name/m-p/4937345#M69313</link>
      <description>Solution was provided.</description>
      <pubDate>Sun, 30 Oct 2005 11:06:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/altering-file-name/m-p/4937345#M69313</guid>
      <dc:creator>Shaf_1</dc:creator>
      <dc:date>2005-10-30T11:06:20Z</dc:date>
    </item>
  </channel>
</rss>

