Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A script to ease scp for files with odd names' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to ease scp for files with odd names
Authored by: 6GTXEK on Sep 13, '07 08:54:42AM

This seems like a quite an odd and dangerous thing to do. It's also fairly broken: it won't work with filenames that have multiple spaces in a row, double quotes, or backslashes in them. And if you have a pipe character, you're in real trouble. That's just at first glance; it probably has plenty of other issues.

I don't understand why you would type out that whole filename and go to the trouble of writing a script to escape it. Either drag-and-drop the file from the Finder into a Terminal window, which will paste the name nicely escaped for you, or use tab completion, which, again, should auto escape the filename. And even if you're dead-set on typing a long filename, it's not that hard to understand the shell's quoting rules and do it correctly yourself.



[ Reply to This | # ]
A script to ease scp for files with odd names
Authored by: Anonymous on Sep 13, '07 10:22:19AM

...or use wildcards for the weirdnesses.



[ Reply to This | # ]