I have followed many links and reference documentation but still facing errors. I want to list all the words start or ending with 'sx'. I already found a solution which works fine:
awk '/^sx|sx$/' usr/dict/words
However I tried to use grep or egrep and neither worked. And then I made it simpler. Any word which contains 'ax' or 'sx', and again it did not work!
grep 'ax|sx' words
grep -E '^ax\|sx$' words
egrep '^ax\|sx$' words
Error:
grep: illegal option -- E
Usage: grep -hblcnsviw pattern file . . .
Any suggestion appreciated.