also sprach martin f krafft <[email protected]> [2010.06.21.1220 +0200]: > See attached. This solution relies on vcquery printing more than two > tab-separated field and including the value of NICKNAME in the > third column. The m_vcf script greps across the entire line, but > then only returns the first two fields.
This is also necessary, or else the fullname will be split at whitespace. Setting $IFS ensures that lines are properly parsed and split on tab characters. -- .''`. martin f. krafft <[email protected]> Related projects: : :' : proud Debian developer http://debiansystem.info `. `'` http://people.debian.org/~madduck http://vcs-pkg.org `- Debian - when you have better things to do than fixing systems
From bc05505cdd70637f57b3d02bcb2619c07705d711 Mon Sep 17 00:00:00 2001 From: martin f. krafft <[email protected]> Date: Mon, 21 Jun 2010 12:28:13 +0200 Subject: [PATCH] set IFS properly Signed-off-by: martin f. krafft <[email protected]> --- m_vcf.sh.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/m_vcf.sh.in b/m_vcf.sh.in index 14ef0f3..a47282f 100644 --- a/m_vcf.sh.in +++ b/m_vcf.sh.in @@ -39,6 +39,7 @@ m_vcf_query() fi $cmd | grep -i "$QUERY" | ( + IFS=" " # parse tab-separated fields while read match1 match2 rest do echo "$match1 $match2 (VCF)" -- 1.7.1
digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)

