commit: 4bdbca1aa0a566f03721a9d3622102d5d2fab318
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 6 00:58:09 2020 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Nov 6 00:58:09 2020 +0000
URL: https://gitweb.gentoo.org/proj/livecd-tools.git/commit/?id=4bdbca1a
unmute: Rewrite without awk
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
init.d/unmute | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/init.d/unmute b/init.d/unmute
index e4892a8..6c588ff 100644
--- a/init.d/unmute
+++ b/init.d/unmute
@@ -9,7 +9,7 @@ start()
{
if [ -e /proc/asound/cards ]
then
- for i in $(cat /proc/asound/cards | awk '{print $1}' | grep
^[[:digit:]])
+ for i in $(grep -o '^\s\?[0-9]\+' /proc/asound/cards)
do
ebegin "Unmuting sound card $i"
if [ -d /proc/asound/card$i ] && [ -x /usr/bin/amixer ]