linux - Bash - Delete lines not ending with a number -


i need remove lines (in text file) not ending number.

before:

 frog  toad 8  snake 3  spider 

after:

 toad 8  snake 3 

try gnu sed edit "in place":

sed -i '/[^0-9]$/d' file 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -