Linux Bash : Remove only numbers or patterns from a long list using SED and more
Q: I want to remove only numbers/specific patterns from a long list ?
You can use "sed" for the above task. Below is the command.
Or if you want to KEEP ONLY numbers.
Or anything you wish to skip in whole text. for eg "-" and "." in below example
#cat filename | sed 's|[-.-]||g'
A more BASH specific way can be ,if you do not wish to use sed:
Well only grep can also perform same stuff:
#cat test | grep -o '[^0-9-]*'
Hope you this little tricks helpful.