Operating System - HP-UX
1833589 Members
5147 Online
110061 Solutions
New Discussion

awk to include blank space

 
kholikt
Super Advisor

awk to include blank space

I use awk to look for " omniback" keyword in a file
Before the word omniback I have four blank space

just wondering

If I use awk'/^ omniback/ {print $4}'
I won't get the result correctly

how could I put four black space together with omniback as search pattern in the above command
abc
2 REPLIES 2
kholikt
Super Advisor

Re: awk to include blank space

just to clarify it is a tab not space
abc
Deepak Extross
Honored Contributor

Re: awk to include blank space

Both these ahould work:
awk'/^\tomniback/ {print $4}'
or
awk'/^omniback/ {print $4}'