adumitrescu
Programmer
Hello,
I've got a string that looks like this:
[blah]A1-18[blah]n.n.n.n[blah]
where [blah] is one or more chars and n is one or more digits. This string lives in a file called 'status' (on Linux 2.4). I need to return only the IP from this string. Here's what I've got so far:
sed -n 's/.*A1-18.*\(\d*\.\d*\.\d*\.\d*\).*/\1/p' status
The command runs without error, but returns nothing. Suggestions? -thanks
I've got a string that looks like this:
[blah]A1-18[blah]n.n.n.n[blah]
where [blah] is one or more chars and n is one or more digits. This string lives in a file called 'status' (on Linux 2.4). I need to return only the IP from this string. Here's what I've got so far:
sed -n 's/.*A1-18.*\(\d*\.\d*\.\d*\.\d*\).*/\1/p' status
The command runs without error, but returns nothing. Suggestions? -thanks