tulsantide
Technical User
Hi,
How to escape special characters in a shell script? Following is working for all the special characters below except for $ and (). Please let me know the solution.
echo "@abc!=${bca}:/{^t&e-st*#}"|sed 's/[$!@{#%}^&*()/-]/\\&/g'
\@abc\!=:\/\{\^t\&e\-st\*\#\}
Thanks
How to escape special characters in a shell script? Following is working for all the special characters below except for $ and (). Please let me know the solution.
echo "@abc!=${bca}:/{^t&e-st*#}"|sed 's/[$!@{#%}^&*()/-]/\\&/g'
\@abc\!=:\/\{\^t\&e\-st\*\#\}
Thanks