From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6E94A5C20D for ; Tue, 10 Jul 2018 07:55:24 +0000 (UTC) Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7121D308FBA0 for ; Tue, 10 Jul 2018 07:55:13 +0000 (UTC) Received: by mail-oi0-f49.google.com with SMTP id c6-v6so40938911oiy.0 for ; Tue, 10 Jul 2018 00:55:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Damon Wang Date: Tue, 10 Jul 2018 15:55:00 +0800 Message-ID: Content-Transfer-Encoding: 8bit Subject: Re: [linux-lvm] Error on RegEx with lv_tags-fields Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="utf-8" To: LVM general discussion and development I have meet same problem, now I use grep :-D Damon Oliver Rath 于2018年7月9日周一 下午8:33写道: > > Hi list, > > Im trying to sort some output with lvs using a regex "=~", which results > in an error: > > # lvs -o lv_name,lv_tags -S 'lv_tags=~mac1' > dm_report: incompatible comparison type for selection field lv_tags > > Otherwise, using the =~ operator on lv_names works well: > > # lvs -o lv_name -S 'lv_name=~z' > LV > z1 > z2 > z3 > > If I see right, I can use the selection type "string list" here, but no > regex. Is this right? Is there a way to use regex on tags? Im looking > for a way doing > > "show me all lv's with tags beginning with "abc.." > > TfH! > > Oliver > > > > _______________________________________________ > linux-lvm mailing list > linux-lvm@redhat.com > https://www.redhat.com/mailman/listinfo/linux-lvm > read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/