Issue
I am trying to find the lines that include only one group of letters. The file includes only digits and lower case letters. No space or anything.
Good example:
39568250269955376311912572precondition005426787530581443236416842014020466976603
Bad example:
1895853531360579the3170095290529923mathematici2779805995331496368099837070an1084
Solution
Could you please try following.
awk 'gsub(/[a-z]+/,"&")==1' Input_file
Explanation: Adding explanation of above code, it is only for explaining purposes for running code kindly use above mentioned code itself.
awk ' ##Starting awk program here.
gsub(/[a-z]+/,"&")==1 ##Using gsub function of awk to substitute all small letters occurrences with same values itself.
##Then checking count of it,if it is equal to 1 then print current line.
##awk works on method of condition and action, in above condition is mentioned but NO action so by default print of current line will happen.
' Input_file ##mentioning Input_file name here, which is being passed to awk program.
Answered By - RavinderSingh13