wok-6.x diff pm-utils/stuff/grep-x.patch @ rev 19489
Add adobe-air-sdk
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Nov 12 20:54:25 2016 +0200 (2016-11-12) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/pm-utils/stuff/grep-x.patch Sat Nov 12 20:54:25 2016 +0200 1.3 @@ -0,0 +1,27 @@ 1.4 +--- functions.in.orig 1.5 ++++ functions.in.new 1.6 +@@ -215,8 +215,22 @@ 1.7 + for p in "$@"; do 1.8 + echo "$p" >> "$PARAMETERS.rm" 1.9 + done 1.10 +- # let grep do the dirty work. 1.11 +- grep -vxFf "$PARAMETERS.rm" "$PARAMETERS" > "$PARAMETERS.new" 1.12 ++ # let awk do the dirty work. 1.13 ++ cat "$PARAMETERS" | awk -v VAR="$(cat "$PARAMETERS.rm")" ' 1.14 ++ { 1.15 ++ del=0 1.16 ++ split(VAR,rm) 1.17 ++ for(i in rm) 1.18 ++ { 1.19 ++ if($1==rm[i]){ 1.20 ++ del++ 1.21 ++ } 1.22 ++ } 1.23 ++ if(del==0) 1.24 ++ { 1.25 ++ print $1 1.26 ++ } 1.27 ++ }' > "$PARAMETERS.new" 1.28 + fi 1.29 + cp -f "$PARAMETERS.new" "$PARAMETERS" 1.30 + }