awk matching pattern in file -


i stuck awk

i have file following structure

<package author=".." label=".." url=".."> <package author=".." label=".." url=".."> ... <package author=".." label=".." url=".."> 

as output want list of url's

how awk.

i thought should

awk '/url="(.*)"/{print $0}' 123 

however doesn't work.

thank you.

if want url value, grep can friend:

$ cat <package author=".." label=".." url="thisis url"> <package author=".." label=".." url="hello"> $ grep -po '(?<=url=\")[^"]+' thisis url hello 

this show contained url=" (not included) until double quote " found.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -