grep ab file.txt #### perl -ne 'print if /ab/' file.txt #### perl -ne 'print if /ab/' file.txt