jb wrote:
> so a simple, s/[^A-Za-z0-9 .]/_/g to replace all questionable chars
> with "_" would work for me. The problem is, when I use find to recurse
> through the directories, I don't want to replace the "/"s between each
> directory in the file's path, but if I add "/" to the regex, I get an
> error. ("\/" didn't work either.)
You need to make sure you have the right number of backslashes. The
shell will eat at least one. There are two options:
s/[^A-Za-z0-9.\\/]/_/g
alternately, use something other than slash as your substitution delimiter:
s,[^A-Za-z0-9./],_,g
Either of those should work.
-jan-
--
Jan L. Peterson
<[EMAIL PROTECTED]>
--------------------
BYU Unix Users Group
http://uug.byu.edu/
The opinions expressed in this message are the responsibility of their
author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG.
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list