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

15 managing disk - understanding /etc/fstab xfs_admin mount -o rw,remount /