SyntaxFix
Write A Post
Hire A Developer
Questions
sed '/\s*\(\S\+\s\+\)\{2\}\bsnow\(man\)\?\b/!d' file
Input:
C1 C2 C3 1 a snow 2 b snowman snow c sowman snow snow snowmanx
..output:
1 a snow 2 b snowman