Open folkvir opened 5 years ago
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"
;;
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
workaround change grep -Po to
grep -o