shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] verificar string dentro de outra string


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]$


reply via email to

[Prev in Thread] Current Thread [Next in Thread]