Command to escape a string in bash
- by User1
I need a bash command that will convert a string to something that is escaped. Here's an example:
echo "hello\world"|escape|someprog
Where the escape command makes "hello\world" into "hello\\world". Then, someprog can use "hello\world" as it expects. Of course, this is a simplified example of what I will really be doing.