linuxcaffe / vcf

vCard find
GNU General Public License v3.0
0 stars 0 forks source link

'vcf -g string' to "grep" results #2

Open linuxcaffe opened 9 years ago

linuxcaffe commented 9 years ago

To reduce the output to field names matching $string, the "-g" option to grep (or sed, or whatever) displaying only lines with matching fields.

./vcf -g tel jane ~/contacts/*.vcf

just shows

work voice phone: (111) 555-1212

home voice phone: (404) 555-1212

the blank line indicates these numbers are from different cards.

l0b0 commented; You can achieve this by using ./vcf jane ~/contacts/*.vcf | grep ^TEL. Other than that it's outside of my scope for the command, but as always you're welcome to implement it.