Quote:
Originally Posted by
bartus11
Post your input and desired output.
I am not at work, and won't be for a few days...I'll see if I can get a hold of it. In the interium, this should give you an idea.
I think I misquoted the search that worked. I believe it should be:
"[^ ].*.domain.com"
Conf file reads like a typical shell script, with server names in the logic statements.
From memory, the typical area in question goes like:
-------------------------------------------
variable= {
"server1.domain.com", "server2.domain.com",
"server3.domain.com", "server4.domain.com", };
If <something> == server1.domain.com || <something> == server5.domain.com
then <stuff>
else <other stuff> server3.domain.com
fi
----------------------------------------------
That is just a sample, it is usually a couple pages of logic, with server names interspersed.
All I want is a list of servers from that code, which would look like this:
server1.domain.com
server2.domain.com
server3.domain.com
server4.domain.com
server1.domain.com
server5.domain.com
server3.domain.com
Which I can then sort with "cat list | sort -u | sort -n > newer_list" to get a single unique list of servers .
Basically, just either extracting the server names, queing off the domain name, or delete every but the servernames. I'd make a copy of the file, and use that, of course
Thanks!