On Wed, Mar 19, 2003 at 08:35:15PM +0100, Gösta Steen wrote:
> Hi,
>
> ich würde gerne was aus dieser Zeile rausfiltern
>
> wort1;wort2;wort3;wort4;wort5
>
> und zwar soll es z.B. wort3 als antwort geben.
> Wenn möglich mittels standart FreeBSD tools (nichts was man instalieren
> muss)
>
Falls Du nicht 5.0 verwendest, kannst Du perl nehmen:
#!/usr/bin/perl
use strict;
my $string = "wort1, wort2r, wort3, wort4, wort5";
if ($string=~ /wort3/)
{ print "Bingo!\n";}
Wenn Du 5.0 verwendest, dann musst Du entweder auf Shell-Skripte
umsteigen oder Perl installieren.
MfG,
Florian.
-- Florian Unglaub <f.unglaub\at\freenet.de> "And root said rm -rf .... and there was nothing."
To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Wed 19 Mar 2003 - 20:58:39 CET