shell_map icon indicating copy to clipboard operation
shell_map copied to clipboard

grep -P not available

Open folkvir opened this issue 7 years ago • 2 comments

workaround change grep -Po to grep -o

folkvir avatar Nov 22 '18 12:11 folkvir

So, I did this a while ago, but I made the following change as a workaround. I'm not 100% sure this is exactly the same, but it has worked well enough for me:

keys)
    #declare | grep -Po "(?<=${FUNCNAME}_DATA_)\w+((?=\=))"
    declare | grep -E "${FUNCNAME}_DATA_[[:alnum:]_]+=" | sed -E "s/${FUNCNAME}_DATA_([[:alnum:]_]+)=.*/\1/g"
;;

xdhmoore avatar Mar 13 '20 00:03 xdhmoore

declare | grep -o "${FUNCNAME}_DATA_[^=]*" | sed "s/^${FUNCNAME}_DATA_//"

Works for me tested on Ubuntu 22.04:

./test_shell_map.sh All tests were successful

rbtylee avatar Jun 29 '24 14:06 rbtylee