Skip to content

Commit

Permalink
Use $(..) instead of legacy ..
Browse files Browse the repository at this point in the history
Backtick command substitution `STATEMENT` is legacy syntax with several issues.

1. It has a series of undefined behaviors related to quoting in POSIX.
2. It imposes a custom escaping mode with surprising results.
3. It's exceptionally hard to nest.
  • Loading branch information
mrmajik45 authored and kingosticks committed Nov 6, 2018
1 parent 9774bc4 commit aeb5650
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions filechanges/opt/musicbox/other/killaudio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ then
mpc stop
fi

AIRPLAY=`netstat -atunp | grep ESTABLISHED | grep 5002`
UPNP=`netstat -atunp | grep gmediarender | grep "CLOSE_WAIT\|ESTABLISHED"`
AIRPLAY=$(netstat -atunp | grep ESTABLISHED | grep 5002)
UPNP=$(netstat -atunp | grep gmediarender | grep "CLOSE_WAIT\|ESTABLISHED")

if [ "$1" != "gm" ]
then
Expand Down

0 comments on commit aeb5650

Please sign in to comment.