I am trying to run this script:
test.sh
#!/bin/bash
BAT_LEVEL=`acpi -b |grep -Eo "[0-9]+%"|grep -Eo "[0-9]+"`
CRIT=0
if [ $BAT_LEVEL -gt $CRIT ]; then
echo "foo"
aplay ~/apert.wav
notify-send "Battery-Low"
echo "bar"
fi
The sixth line from above which is notify-send "Battery-Low" works just as you'd expect in terminal.
But when the script is executed it just spits out foo and bar on stdout.
I have no clue what the problem might be.
./test.shin the directory of the file insideM-x shellof emacs.aplayline gives me some error too.