Created
August 2, 2024 10:54
-
-
Save inceabdullah/69b9c555bd1821730e8c0dee890203a1 to your computer and use it in GitHub Desktop.
Escape Parenthesis Function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| function escape_parentheses () { | |
| local input="$1" | |
| echo "$input" | sed -e 's@(@\\(@g' -e 's@)@\\)@g' | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment