Filter lines that have only alphabets in first column
Using Perl: # Match all lines that start with a-z or A-Z and are followed by a space perl -ne ‘print if m/^[a-z]+\s/i’ file Using awk: # Match first field’s that only contain a-z or A-Z awk ‘$1 ~ /^[a-zA-Z]+$/’ file Both will output: CABMEL 1873 1 1 CABMEL 1874 1 1 CABMEL 1875 1 … Read more