Discussion: sh question
Afficher un message
Vieux 24/08/2006, 21h12   #2
Bill Marcum
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sh question

On 24 Aug 2006 11:06:27 -0700, yuetwah2000@hotmail.com
<yuetwah2000@hotmail.com> wrote:
> In Shell script, how do I check if a variable contains a :?, there is
> something like variable =~ : in Perl, what about in Perl?
>


case $variable in
*:\?*) echo yes ;;
*) echo no ;;
esac


--
The major sin is the sin of being born.
-- Samuel Beckett
  Réponse avec citation
 
Page generated in 0,04111 seconds with 9 queries