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
Try this:
sed -e 's/[^0-9]\+//'
One way using sed
:
sed 's/^[^0-9]*//' <<<" Linux Release............5.4.2.0-02 12_12_2011_07:31:23"
Result:
5.4.2.0-02 12_12_2011_07:31:23