Shell special chars in file names? 
Author Message
 Shell special chars in file names?

A perl script I'm writing outputs a /bin/sh script.  However,
if it generates a filename like "/home/blah/The File" the
sh script really should output "foo /home/blah/The\ File"

Right now I'm dealing with that via:

        $filename = s/ /\\ /g;

However, I should also do this for all special sh chars.

1.  Is there a way to do all the special chars in one substitution?
2.  Is there a definitive list of what those chars are?

Thanks in advance,


History will judge our times not         | Disclaimer:  I do not
by the ferocity of our enemies,          | speak for Mentor Graphics.
but by the silence of our friends!       |

Wed, 27 Nov 1996 02:40:28 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Dealing with the special chars in the file name

2. Replacing special chars with special chars

3. rename files with special chars

4. Problems with 14 char file names on HP-UX

5. pattern matching with special char

6. escape special chars before loading into MySQL

7. Special chars

8. special chars

9. about special chars when split()

10. Text::CSV with Special Chars?

11. perl/sendmail: encoding special chars

12. Automatic quoting special chars in string for reg exp


Powered by phpBB® Forum Software