Redirect the "echo \t" outputs to the desired file, and avoid messing up stdio.
Signed-off-by: Wu Fengguang fengguang.wu@intel.com --- 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