I would like to keep the lines with exactly 639 characters in my .txt file. What is the command to do so?
Command for keeping the lines with a certain length in a file
text processing
You can use grep:grep -E '^.{639}$' your.txtThe ^ and $ match beginning and end of line. The .{639} match any character exactly 639 times.As Stphane commented, this can be shortened (by one character) to:grep -Ex '.{639}' your.txtwith -x indicating: Select only those matches that exactly match the whole line