From 68e706073e952526392e4e69bf995b72ac332fd0 Mon Sep 17 00:00:00 2001 From: compudj Date: Tue, 23 Dec 2008 19:49:22 +0000 Subject: [PATCH] really fix newline git-svn-id: http://ltt.polymtl.ca/svn@3191 04897980-b3bd-0310-b5e0-8ef037075253 --- trunk/ltt-control/lttctl/ltt-armall.sh | 8 +++++--- trunk/ltt-control/lttctl/ltt-disarmall.sh | 9 ++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/trunk/ltt-control/lttctl/ltt-armall.sh b/trunk/ltt-control/lttctl/ltt-armall.sh index 5481b761..fe103d14 100755 --- a/trunk/ltt-control/lttctl/ltt-armall.sh +++ b/trunk/ltt-control/lttctl/ltt-armall.sh @@ -5,7 +5,10 @@ echo Connecting all markers MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2 " " $4}'|sort -u|grep -v ^metadata|grep -v ^locking|grep -v ^lockdep` #separator is newline, ensure compatibility with bash and ash -IFS=$' ' +N=" +" + +IFS=${N} for a in $MARKERS; do echo Connecting $a @@ -40,8 +43,7 @@ MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2}'|sort -u |grep ^tap_` #Uncomment the following to also record lockdep events. #MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2}'|sort -u|grep -e ^tap_ -e ^lockdep` -#separator is newline, ensure compatibility with bash and ash -IFS=$' ' +IFS=${N} for a in $MARKERS; do echo Connecting $a diff --git a/trunk/ltt-control/lttctl/ltt-disarmall.sh b/trunk/ltt-control/lttctl/ltt-disarmall.sh index f9c626d4..83e81ce1 100755 --- a/trunk/ltt-control/lttctl/ltt-disarmall.sh +++ b/trunk/ltt-control/lttctl/ltt-disarmall.sh @@ -3,8 +3,12 @@ echo Disconnecting all markers MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2 " " $4}'|sort -u|grep -v ^metadata|grep -v ^locking|grep -v ^lockdep|grep -v ^tap` + #separator is newline, ensure compatibility with bash and ash -IFS=$' ' +N=" +" + +IFS=${N} for a in $MARKERS; do echo Disconnecting $a; echo "disconnect $a" > /proc/ltt; done # Markers starting with "tap_" are considered high-speed. @@ -14,8 +18,7 @@ MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2 " " $4}'|sort -u |grep ^tap` #Uncomment the following to also stop recording lockdep events. #MARKERS=`cat /proc/ltt|grep -v %k|awk '{print $2}'|sort -u|grep -e ^tap_ -e ^lockdep` -#separator is newline, ensure compatibility with bash and ash -IFS=$' ' +IFS=${N} for a in $MARKERS; do echo Disconnecting $a -- 2.34.1