On Mon, Dec 05, 2011 at 08:59:41AM -0700, Eric Blake wrote:
> On 12/05/2011 08:21 AM, Bill Gradwohl wrote:
> > if [ $(echo "${templateMachine}"|egrep -q '\.')
> Try:
> if { [ -n "$TemplateMachine" ]
Bill was looking for a literal period, so -n "$foo" isn't equivalent.
In bash, it's simply: if [[ $templateMachine = *.* ]]
In POSIX, you have to use case:
case $templateMachine in
*.*) ...