: alsaconf: -bash: syntax error in conditional expression
A NOTE has been added to this issue.
======================================================================
<https://bugtrack.alsa-project.org/alsa-bug/view.php?id=318>
======================================================================
Reported By: Toralf Förster
Assigned To:
======================================================================
Project: ALSA - utils Issue ID: 318 Category: alsaconf Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 05-31-2004 12:25 CEST Last Modified: 01-19-2005 15:36 CET
======================================================================
Summary: alsaconf: -bash: syntax error in conditional
expression
Description:
The error above results from lines like:
elif [ -f /etc/redhat-release -a grep -c "Red Hat" /etc/redhat-release 2>/dev/null -ne 0 ]; then
instead it should be
elif [[ -f /etc/redhat-release && grep -c "Red Hat" /etc/redhat-release 2>/dev/null -ne 0 ]; then
notice the doubled '[[' and ']]' and '&&' instead of '-a', isn't it ?
======================================================================
----------------------------------------------------------------------
jdthood - 01-19-05 15:36
----------------------------------------------------------------------
You don't have to use double brackets.
< elif [ -f /etc/redhat-release -a grep -c "Red Hat" /etc/redhat-release 2>/dev/null -ne 0 ]; then
Quoted 1 line
elif [ -f
/etc/redhat-release] && [ "$(grep -c "Red Hat"
/etc/redhat-release 2>/dev/null)" -ne "0" ]; then
Issue History
Date Modified Username Field Change
======================================================================
05-31-04 12:25 Toralf Förster New Issue
01-19-05 15:36 jdthood Note Added: 0003288
======================================================================
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt