Hi I've tried many solutions to similar questions and none have seemed to work for me. I have a text file where each line has an undefined length of numbers after the string " length_ ". How can I select out all the lines where that number is equal to or greater than 5000? This has been the cleanest looking code attempt I’ve tried so far, but it still just produces an empty file (even though file1 definitely contains lines with numbers greater than 5000)
grep --regexp="length_\"[5-9][0-9]\{3,\}\"" file1.txt > file2.txt
example info within input text file:
/file/path/xx00:>TEXT_1_length_81903_cov_10.5145_
/file/path/xx01:>TEXT_2_length_348971_cov_13.6753_
/file/path/xx02:>TEXT_3_length_4989_cov_11.9516_
/file/path/xx03:>TEXT_4_length_29811_cov_13.7948_
/file/path/xx03:>TEXT_5_length_2567_cov_13.7948_
desired example info within output text file:
/file/path/xx00:>TEXT_1_length_81903_cov_10.5145_
/file/path/xx01:>TEXT_2_length_348971_cov_13.6753_
/file/path/xx03:>NODE_4_length_29811_cov_13.7948_