1755740 Members
3797 Online
108837 Solutions
New Discussion юеВ

sed or cut?

 
SOLVED
Go to solution
Coolmar
Esteemed Contributor

sed or cut?

I need to remove all the letters up to the first number in a string. How can I do that?

Ie:

abcdef012345 - output 012345
xyz5678 - output 5678
2 REPLIES 2
James R. Ferguson
Acclaimed Contributor
Solution

Re: sed or cut?

Hi:

One way:

# echo "abcdef012345"|sed -e 's/^[a-zA-Z]*//'

Regards!

...JRF...
Coolmar
Esteemed Contributor

Re: sed or cut?

thanks