in reply to Problems with special characters in Linux file names
use String::ShellQuote; # this package almost n +ever works
I couldn't agree more with that comment: Problems with String::ShellQuote
Are you sure that tcsh uses the same quoting rules as bourne shells? If not, you are probably in trouble. I don't really know, but a quick Google search suggests that there are differences. I found a pirated copy of "Unix Power Tools" (third edition) that has an entire chapter named "Differences Between Bourne and C Shell Quoting". It lists three differences, of which at least two are relevant for String::ShellQuote. In csh, ! can only be quoted by a backslash, it keeps its special meaning even inside single quotes. And the csh needs a backslash before newlines inside single and double quotes, unlike bourne shells.
And by the way, shell_quote_best_effort() may damage data and hides errors. See Problems with String::ShellQuote.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problems with special characters in Linux file names
by ikegami (Patriarch) on Sep 18, 2022 at 21:01 UTC |