Link to home
Start Free TrialLog in
Avatar of TIMFOX123
TIMFOX123Flag for United States of America

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
SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TIMFOX123

ASKER

Thank you all

this really helps me!!