A
A
Alexander Urich2015-05-20 11:41:14
bash
Alexander Urich, 2015-05-20 11:41:14

What characters need to be escaped in bash?

Hi all. I know that spaces and parentheses must be escaped in file paths when accessed through the console. What other characters need to be escaped?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
3
3vi1_0n3, 2015-05-20
@Urichalex

$, &, |, \, ". In general, anything that can be interpreted by the shell in one way or another.
Alternatively, you can use trailing quotes, like this: '/home/user/dir 1/dir 2' , then you don't need to escape.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question