I want to be able to escape symbols in path string so I could pass it to bash without quotes.
I.e. i have a file sample (1).txt
.
I want to transform this string into sample\ \(1\).txt
. Spaces and braces are an example of symbols, which should be definitely escaped.
I would like to use a method which will escape ALL characters which should be escaped.
Maybe there is one in default library or in some other popular library.