Gentoo Archives: gentoo-user-de

From: Nils Andresen <nils-lists@×××××××.de>
To: gentoo-user-de@l.g.o
Subject: Re: [gentoo-user-de] bash Problem Reguläre Ausdrücke
Date: Sun, 07 May 2006 07:47:39
Message-Id: 20060507093942.4f073239@yavin.heimnetz.lan
In Reply to: Re: [gentoo-user-de] bash Problem Reguläre Ausdrücke by stephan ulbing
1 Am Sun, 7 May 2006 07:01:40 +0200
2 schrieb stephan ulbing <stephan.ulbing@×××××××.at>:
3 > zeit=`echo $my_var | grep '^Portage-Proxy-DomU' | awk '{print $6}'`
4
5 Moin.
6 in dieser Zeile finde ich ist ein grep zu viel :-)
7
8 zeit=`echo $my_var | awk '/^Portage-Proxy-DomU/ {print $6}'`
9
10 und ganz persönlich würde ich das dann so schreiben :
11
12 zeit=$(echo $my_var | awk '/^Portage-Proxy-DomU/ {print $6}')
13
14
15 Grüße,Nils

Attachments

File name MIME type
signature.asc application/pgp-signature