I need to find in file word that matches regex pattern. It must to be using awk...
I ONLY want to print word matched with pattern!
So if in line, i have:
xxx yyy zzz
And pattern:
/yyy/
I wonna only get:
yyy
EDIT: thanks to kurumi i managed to write something like this:
awk '{
for(i=1; i<=NF; i++) {
tmp=match($i, /[0-9]..?.?[^A-Za-z0-9]/)
if(tmp) {
print $i
}
}
}' $1
and this is what i needed :) thanks a lot!