|
From: | Édnei Rodrigues |
Subject: | Re: [shell-script] verificar string dentro de outra string |
Date: | Wed, 4 Jun 2008 09:51:30 -0400 |
O que tu pode fazer é usar o SED : [ednei@eng-17 daemonconf]$ teste="getstate() = on" [ednei@eng-17 daemonconf]$ echo "teste" teste [ednei@eng-17 daemonconf]$ echo "$teste" getstate() = on [ednei@eng-17 daemonconf]$ echo "$teste" | sed 's/on/off/' getstate() = off [ednei@eng-17 daemonconf]$
[Prev in Thread] | Current Thread | [Next in Thread] |