13 Feb
2012
13 Feb
'12
07:27
lynn wrote:
I'm regex'd out of it at the moment. Given a string like this:
lynn:*:3000002some other stuff100hellolynn:
Is there a way to get the 3000002 into a variable v1 and the 100 into a variable v2? bash? Any recommended starting point?
Assuming you've got a file with such lines, this might get you started: sed -r -e 's/^[^0-9]*([0-9]+)[^0-9]+([0-9]+).*$/\1 \2/' file -- Per Jessen, Zürich (-9.9°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org