Skip to content

Commit

Permalink
[script] Fix grep
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeyexp committed Oct 5, 2018
1 parent 114b9aa commit 839aaa9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sleep 2
#
# check outputs
#
pa_device=$(cat /etc/pulse/client.conf | grep 'default-sink =' | cut -d= -f2 | sed 's/\t//g' | sed 's/^ //' | sed 's/ *$//')
pa_device=$(cat /etc/pulse/client.conf | grep '^default-sink =' | cut -d= -f2 | sed 's/\t//g' | sed 's/^ //' | sed 's/ *$//')
# available device count
countdevices=$(pactl list sinks short | grep -v bluez | awk {'print $2'} | wc -l)

Expand Down Expand Up @@ -75,7 +75,7 @@ fi
#
# check inputs
#
pa_inputdevice=$(cat /etc/pulse/client.conf | grep 'default-source =' | cut -d= -f2 | sed 's/\t//g' | sed 's/^ //' | sed 's/ *$//')
pa_inputdevice=$(cat /etc/pulse/client.conf | grep '^default-source =' | cut -d= -f2 | sed 's/\t//g' | sed 's/^ //' | sed 's/ *$//')
# available device count
countinputdevices=$(pactl list sources short | grep -v bluez | grep -v monitor | awk {'print $2'} | wc -l)

Expand Down Expand Up @@ -138,7 +138,7 @@ else
fi

# Set samplerate and sampleformat
pa_device=$(cat /etc/pulse/client.conf | grep 'default-sink =' | cut -d= -f2 | sed 's/\t//g' | sed 's/^ //' | sed 's/ *$//')
pa_device=$(cat /etc/pulse/client.conf | grep '^default-sink =' | cut -d= -f2 | sed 's/\t//g' | sed 's/^ //' | sed 's/ *$//')
pa_samplerate=$(cat /etc/pulse/daemon.conf | grep 'default-sample-rate =' | cut -d= -f2 | sed 's/\t//g' | sed 's/^ //' | sed 's/ *$//')
pa_sampleformat=$(cat /etc/pulse/daemon.conf | grep 'default-sample-format =' | cut -d= -f2 | sed 's/\t//g' | sed 's/^ //' | sed 's/ *$//')

Expand Down

0 comments on commit 839aaa9

Please sign in to comment.