bash quoting is simple: put single quotes around the string after replacing every ' in the string with '"'"'
sub bashquote { "'" . shift =~ s/'/'"'"'/gr . "'" }
Sure, sometimes the wrapping single quotes are not needed, but if they are just around directory names and file names, they don't hurt.
In reply to Re: Escape special chars in a path
by tybalt89
in thread Escape special chars in a path
by ovedpo15
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |