I have a large file (>10000 lines) that contains one word per line, with a newline character after each word. The words contain no spaces.
I'd like to list (or even better, output to a new file) any words that start and/or end with a number, then I'd like to remove these from the original file. But I don't want to remove words that just contain numbers.
For example, if I had the contents
789 hello 1hello 112121hello3323 he11o hello9 88888
Then the strings
hello9 would get output and then removed from the file.
How can I do this?