Linux – How to use sed or awk to remove text

awklinuxsedshell

I have the following line in a file:

      Linux Release............5.4.2.0-02 12_12_2011_07:31:23

How do I remove all characters before the first number with sed or awk?

I wish to get the following result:

      5.4.2.0-02 12_12_2011_07:31:23

Best Answer

Try this:

sed -e 's/[^0-9]\+//'
Related Topic