Skip to main content
Added double quotes
Source Link
Fred
  • 7.1k
  • 12
  • 22

Try this instead :

#!/bin/sh
SONAR=~/"SonarQube/bin/linux-x86-64/sonar.sh"
echo "Waiting to start..."
$SONAR"$SONAR" start

Tilde expansion is disabled by quoting (like globbing), so you need to put the tilde outside the quotes.

The last line should not be inside $(), as doing this first executes the command, and then expands the content and tries to execute a commande expressed by such content.

Try this instead :

#!/bin/sh
SONAR=~/"SonarQube/bin/linux-x86-64/sonar.sh"
echo "Waiting to start..."
$SONAR start

Tilde expansion is disabled by quoting (like globbing), so you need to put the tilde outside the quotes.

The last line should not be inside $(), as doing this first executes the command, and then expands the content and tries to execute a commande expressed by such content.

Try this instead :

#!/bin/sh
SONAR=~/"SonarQube/bin/linux-x86-64/sonar.sh"
echo "Waiting to start..."
"$SONAR" start

Tilde expansion is disabled by quoting (like globbing), so you need to put the tilde outside the quotes.

The last line should not be inside $(), as doing this first executes the command, and then expands the content and tries to execute a commande expressed by such content.

Explanations
Source Link
Fred
  • 7.1k
  • 12
  • 22

Try this instead :

#!/bin/sh
SONAR=~"SONAR=~/SonarQube"SonarQube/bin/linux-x86-64/sonar.sh"
echo "Waiting to start..."
$SONAR start

Tilde expansion is disabled by quoting (like globbing), so you need to put the tilde outside the quotes.

The last line should not be inside $(), as doing this first executes the command, and then expands the content and tries to execute a commande expressed by such content.

Try this instead :

#!/bin/sh
SONAR=~"/SonarQube/bin/linux-x86-64/sonar.sh"
echo "Waiting to start..."
$SONAR start

Try this instead :

#!/bin/sh
SONAR=~/"SonarQube/bin/linux-x86-64/sonar.sh"
echo "Waiting to start..."
$SONAR start

Tilde expansion is disabled by quoting (like globbing), so you need to put the tilde outside the quotes.

The last line should not be inside $(), as doing this first executes the command, and then expands the content and tries to execute a commande expressed by such content.

Source Link
Fred
  • 7.1k
  • 12
  • 22

Try this instead :

#!/bin/sh
SONAR=~"/SonarQube/bin/linux-x86-64/sonar.sh"
echo "Waiting to start..."
$SONAR start