
September 24th, 2003, 03:24 PM
|
 |
The Evil Monkey
|
|
Join Date: Apr 2003
Posts: 220

Time spent in forums: 6 h 40 m 25 sec
Reputation Power: 11
|
|
Escape characters in a move command?
I am trying to create a shell script for the ksh shell. The script is intended to scan a directory looking for improper characters in the filenames. If it finds any, it moves the file using mv from the old filename to the new filename. The trouble is, you cannot move the file because it has improper characters in the filename!
So the question is, how can I escape those illegal characters? The types of characters I'm dealing with are like the ampersand, quotes, or the plus/minus symbol, which I think is just a converted whitespace.
How can I escape these characters when doing a move command? I already tried putting a backslash before each one and it didn't work.
Any input is welcome. Thanks!
|