If I use -E option for grep from a script I'm unable to user variables.
For example:
txt file:
word
nir asd b asd
text
script:
#!/bin/bash
PARAM=b
cat txt | grep -E 'nir.*${PARAM}'
The script return nothing. I guess with -E option I need to escape the variable somehow.
grep. The"solved it, thanks