TIMFOX123
asked on
awk question for a simple regex
I am not a good awk-ward guy
I have a file that has error messages in it. I do a
head -1 filename |
this gives me the the error message.
I want to PICK the hostname out of the string.
I am in a secure environment so I always use "bart" as an example server name.
Notes: Host:bart Problem:
I want to pull out the part of the string that starts with:
Notes: Host:
and ends with:
Problem:
so in this case it would find:
bart
I have a file that has error messages in it. I do a
head -1 filename |
this gives me the the error message.
I want to PICK the hostname out of the string.
I am in a secure environment so I always use "bart" as an example server name.
Notes: Host:bart Problem:
I want to pull out the part of the string that starts with:
Notes: Host:
and ends with:
Problem:
so in this case it would find:
bart
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
this really helps me!!