When I execute ls /directory | grep '[^term]'
in Bash I get a regular listing, as if the grep
command is ignored somehow. I tried the same thing with egrep
, I tried to use it with double and single quotes, but to no better results. When I try ls /directory | grep '^[term]
I get all entries beginning with term – as expected.