Thursday, 29 December 2016

Shell Script 11 : Regular Expression (a)

How to grep both specialize and specialise in one file?

jtony@genoa:~/learn/shell$ cat test
specialize
aaaaaaaaaa
specialise
jtony@genoa:~/learn/shell$ egrep "speciali(s|z)e" test
specialize
specialise






Note: grep won't work.


 

No comments:

Post a Comment