From a038cecc2aecbdb596c286e20722a4effe11e704 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 20 Jan 2017 05:24:45 +0300 Subject: remove str_invert_match I can't remember what it's for anyway. --- %HOME%/.bash_utils/text.sh | 18 ------------------ 1 file changed, 18 deletions(-) (limited to '%HOME%') diff --git a/%HOME%/.bash_utils/text.sh b/%HOME%/.bash_utils/text.sh index 22c20e3..15fb17f 100644 --- a/%HOME%/.bash_utils/text.sh +++ b/%HOME%/.bash_utils/text.sh @@ -205,21 +205,3 @@ str_join() ( ;; esac ) - -str_invert_match() ( - set -o errexit -o nounset -o pipefail - - local -a pattern_list=() - - local pattern - for pattern; do - pattern_list+=('-e' "$pattern") - done - - if [ "${#pattern_list[@]}" -eq 0 ]; then - cat - else - grep --fixed-strings --invert-match \ - ${pattern_list[@]+"${pattern_list[@]}"} - fi -) -- cgit v1.2.3