I need to search in a file like a hash. Wondering if awk is right solution
Input example:
bla 123.123.123.0
# This line should be a comment
ble www.ble.com
bli <random whitespace> ::1
blo anything
I need two different outputs depending on the context:
Get keys:
bla ble bli blo
And search(ble)
www.ble.com
I was hoping that this is trivial with awk
Edit: Improved description for input format
One way like this(not very clear with requirement):