[PATCH 2/4] alsa-info.sh: fix whitespace leaked to stdout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Redirect the "echo \t" outputs to the desired file,
and avoid messing up stdio.

Signed-off-by: Wu Fengguang <fengguang.wu@xxxxxxxxx>
---
 utils/alsa-info.sh |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- alsa-driver.orig/utils/alsa-info.sh
+++ alsa-driver/utils/alsa-info.sh
@@ -519,7 +519,10 @@ echo "!!--------------------------" >> $
 echo "" >> $FILE
 for mod in `cat /proc/asound/modules|awk {'print $2'}`;do
 echo "!!Module: $mod" >> $FILE
-for params in `ls $SYSFS/module/$mod/parameters/*`; do /bin/echo -ne "\t";/bin/echo "$params : `cat $params`"|sed 's:.*/::' >> $FILE;done
+for params in `echo $SYSFS/module/$mod/parameters/*`; do
+	echo -ne "\t";
+	echo "$params : `cat $params`" | sed 's:.*/::';
+done >> $FILE
 echo "" >> $FILE
 done
 echo "" >> $FILE

-- 

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux