diff options
author | Jonathan Bauer | 2013-04-17 16:25:38 +0200 |
---|---|---|
committer | Jonathan Bauer | 2013-04-17 16:25:38 +0200 |
commit | a8b11556ccee779ba5bc988d3efae16f4d68b174 (patch) | |
tree | 30b722408f67d03a1adf1be3ceccb4e33b05443a /helper/string.inc | |
parent | delete symlink.. (diff) | |
download | tm-scripts-a8b11556ccee779ba5bc988d3efae16f4d68b174.tar.gz tm-scripts-a8b11556ccee779ba5bc988d3efae16f4d68b174.tar.xz tm-scripts-a8b11556ccee779ba5bc988d3efae16f4d68b174.zip |
kernel compile preparations
Diffstat (limited to 'helper/string.inc')
-rw-r--r-- | helper/string.inc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/helper/string.inc b/helper/string.inc index 0a166708..9f18e4e0 100644 --- a/helper/string.inc +++ b/helper/string.inc @@ -12,3 +12,12 @@ trim() { canonicalize() { cd -P -- "$(dirname -- "$1")" && printf '%s\n' "$(pwd -P)/$(basename -- "$1")" } + +escape_search() { + sed -e 's/[]\/()$*.^|[]/\\&/g' + +} + +escape_replace() { + sed -e 's/[\/&]/\\&/g' +} |