<?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: remove special character and space from file name in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-special-character-and-space-from-file-name/m-p/4293501#M337121</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I mean I have 7000 file after running this command I will get 6755 file.&lt;BR /&gt;&lt;BR /&gt;...which probably means that you are overwriting 245 of your files.  You need to formulate the new file name and *test* for its presence *before* you 'mv' (rename) the old file to the new file.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Fri, 24 Oct 2008 11:44:25 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2008-10-24T11:44:25Z</dc:date>
    <item>
      <title>remove special character and space from file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-special-character-and-space-from-file-name/m-p/4293498#M337118</link>
      <description>Hi &lt;BR /&gt;I have some issue while removing special character and space from file name in hp-ux.&lt;BR /&gt;I have 7000 file which have special charater and space between two character in file name.&lt;BR /&gt;Which I remove with help of shell script.I used this command.&lt;BR /&gt;for file in *&lt;BR /&gt;do&lt;BR /&gt;mv "$file" `echo "$file" | sed 's/[^A-Za-z0-9_.]//g'`&lt;BR /&gt;done&lt;BR /&gt;this is working but I am getting lesser file.&lt;BR /&gt;I mean I have 7000 file after running this command I will get 6755 file.&lt;BR /&gt;So how can I get exact file after running this command.&lt;BR /&gt;Please help me any body.&lt;BR /&gt;Thanks&lt;BR /&gt;Dhirendra</description>
      <pubDate>Fri, 24 Oct 2008 10:07:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-special-character-and-space-from-file-name/m-p/4293498#M337118</guid>
      <dc:creator>Dhirendra kumar Thakur</dc:creator>
      <dc:date>2008-10-24T10:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: remove special character and space from file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-special-character-and-space-from-file-name/m-p/4293499#M337119</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] I have 7000 file after running this&lt;BR /&gt;&amp;gt; command I will get 6755 file.&lt;BR /&gt;&lt;BR /&gt;If you have two files, one named "a b", and&lt;BR /&gt;one named "a    b", your name-changing method&lt;BR /&gt;will get "ab" for both of them.  You might do&lt;BR /&gt;better using something like:&lt;BR /&gt;    sed 's/[^A-Za-z0-9_.]/_/g'&lt;BR /&gt;but that can fail in other cases.&lt;BR /&gt;&lt;BR /&gt;You may need to do something smarter than&lt;BR /&gt;simply throwing away unwanted characters, but&lt;BR /&gt;my psychic powers are too weak to tell me&lt;BR /&gt;waht your file names look like, or how you&lt;BR /&gt;would like to handle the more tricky cases.</description>
      <pubDate>Fri, 24 Oct 2008 11:10:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-special-character-and-space-from-file-name/m-p/4293499#M337119</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-10-24T11:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: remove special character and space from file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-special-character-and-space-from-file-name/m-p/4293500#M337120</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Please provide the old and new file name.&lt;BR /&gt;&lt;BR /&gt;Suraj</description>
      <pubDate>Fri, 24 Oct 2008 11:13:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-special-character-and-space-from-file-name/m-p/4293500#M337120</guid>
      <dc:creator>Suraj K Sankari</dc:creator>
      <dc:date>2008-10-24T11:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: remove special character and space from file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-special-character-and-space-from-file-name/m-p/4293501#M337121</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I mean I have 7000 file after running this command I will get 6755 file.&lt;BR /&gt;&lt;BR /&gt;...which probably means that you are overwriting 245 of your files.  You need to formulate the new file name and *test* for its presence *before* you 'mv' (rename) the old file to the new file.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 24 Oct 2008 11:44:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-special-character-and-space-from-file-name/m-p/4293501#M337121</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-10-24T11:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: remove special character and space from file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-special-character-and-space-from-file-name/m-p/4293502#M337122</link>
      <description>I put some file name as in my system which I have to make as corrective name so that we can access this file.&lt;BR /&gt;ADMIRALM-. 1089 FS-MSDS-English.pdf&lt;BR /&gt; ADMIRALM-. 1089 FS-MSDS_CANADA-Canadian English.pdf&lt;BR /&gt; ADMIRALM-. 1089 FS-MSDS_CANADA-Canadian French.pdf&lt;BR /&gt; ADMIRALM-. 1165 PR -- DELETE FROM MRIF DB 73106-MSDS-English.pdf&lt;BR /&gt; ADVANTAGEM-^Y AC1529-MSDS-English.pdf&lt;BR /&gt; ADVANTAGEM-^Y AC1529-MSDS_CANADA-Canadian English.pdf&lt;BR /&gt; ADVANTAGEM-^Y AC1529-MSDS_CANADA-Canadian French.pdf&lt;BR /&gt; XXTRADURA CAS-MSDS-English.pdf&lt;BR /&gt; XXTRADURA FLA 3766-MSDS-English.pdf&lt;BR /&gt; XXTRADURA FLA 3767-MSDS-English.pdf&lt;BR /&gt; YARMORÂ® 302 -- OBSOLETE PER C SHANNON 41906-MSDS-English.pdf&lt;BR /&gt; YARMORÂ® 302 -- OBSOLETE PER C SHANNON 41906-MSDS_CANADA-Canadian English.pdf&lt;BR /&gt; YARMORÂ® 302 -- OBSOLETE PER C SHANNON 41906-MSDS_CANADA-Canadian French.pdf&lt;BR /&gt; YARMORÂ® 60-SC -- OBSOLETE PER C SHANNON 33006-MSDS-English.pdf&lt;BR /&gt; YARMORÂ® 80 -- OBSOLETE PER C SHANNON 33006-MSDS-English.pdf&lt;BR /&gt;&lt;BR /&gt;and after running this command again and I got 150 lesser file.&lt;BR /&gt;sed 's/[^A-Za-z0-9_.]/_/g'&lt;BR /&gt;regards&lt;BR /&gt;Dhirendra</description>
      <pubDate>Fri, 24 Oct 2008 11:56:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-special-character-and-space-from-file-name/m-p/4293502#M337122</guid>
      <dc:creator>Dhirendra kumar Thakur</dc:creator>
      <dc:date>2008-10-24T11:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: remove special character and space from file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-special-character-and-space-from-file-name/m-p/4293503#M337123</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] and I got 150 lesser file.&lt;BR /&gt;&lt;BR /&gt;You could do the suggested test, and don't do&lt;BR /&gt;the "mv" if the destination file exists.&lt;BR /&gt;Then change "_" to "__" and try again.&lt;BR /&gt;Repeat as needed.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Whether it makes sense to rename files in&lt;BR /&gt;ways where you don't know what the old name&lt;BR /&gt;was is another question entirely.</description>
      <pubDate>Fri, 24 Oct 2008 14:20:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-special-character-and-space-from-file-name/m-p/4293503#M337123</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-10-24T14:20:18Z</dc:date>
    </item>
  </channel>
</rss>

