sed:delete:delete_all_lines_of_a_file_with_n_characters
This is an old revision of the document!
SED - Delete - Delete all lines of a file with N characters
sed -s -i -r '/^.{9}$/d' ./*.txt
Use AWK
awk -v n=5 '{ line = $0; gsub("[^[:graph:]]", "") } length >= 23 { print line }'
NOTE: Anything over 23 characters it will delete …you can change 23 to any value.
sed/delete/delete_all_lines_of_a_file_with_n_characters.1597575805.txt.gz · Last modified: 2020/08/16 11:03 by 192.168.1.1