I have some random strings. I am trying to print only the whole words with the following:
grep -ioh "\w*ice\w*"
This works fine but it seems to don't showing the symbols but only letters. I'd like the wildcards to allow any symbols but the spaces. Is this something possible?
To better explain, the above code in a string like:
The cat is very-nice shows only "nice" while I'd like to have "very-nice"