Ubuntu – How to make grep to work with newline in bash variable
I want to use grep to filter some lines defined in a bash variable. If the variable is defined within the "$(cat)", then the result is correct: test_string=$(cat <<END hello world test bar hello END ) echo -e "$test_string" filter_string="$(grep…