I would like to check if a string
begins with "node" e.g. "node001". Something
like
if [ $HOST ==
user* ]
then
echo
yes
fi
How
can I do it correctly?
/>
I further need to combine expressions to
check if HOST is either "user1" or begins with
"node"
if [ [[ $HOST == user1 ]]
-o [[ $HOST == node* ]] ];
then
echo
yes
fi
> > > -bash: [: too many
arguments
How
can I do it correctly?
No comments:
Post a Comment