egrep

egrep [xyz] /etc/passwd
egrep x:[0-9]{3} /etc/passwd
egrep ^r /etc/passwd
egrep '[bash!false]' /etc/passwd

For example, the following will display either Manager or Developer (bot ignore Sales).

$ egrep 'Manager|Developer' employee.txt | grep -v Sales

Comments

Popular posts from this blog

HAproxy logging

teamcity Automatic Agent Start under Linux

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all