View Single Post
chemist's Avatar
Administrator | Posts: 1,036 | Thanked: 2,019 times | Joined on Sep 2009 @ Germany
#6
Code:
awk 'BEGIN{FS=":"} /^TEL/{print $2} /^FN/{print $2} /END:/{print "\n"}' /home/user/.osso-abook/db/addressbook.db|awk 'BEGIN { RS="\n\n"; FS="\n"; PATTERN="pattern" } { if ( $0 ~ PATTERN ) print $0; }' $0; }'
Thats the awk one-liner for displaying all matching contacts with name and all numbers available, for some reason I get the same displayed x times while x = #_of_phone-numbers. (Well proof of concept...just a few lines are needed to do this in a shell script properly)

As this is on its way I keep my hands off till asked for it.