]> Creatis software - clitk.git/commitdiff
Replace tabulations with space in pts_to_landmarks script
authorVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Wed, 29 Feb 2012 12:13:01 +0000 (13:13 +0100)
committerVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Wed, 29 Feb 2012 12:13:01 +0000 (13:13 +0100)
scripts/pts_to_landmarks.sh

index e93cbe465518beedcf2ef08a584e5acbcf57c021..5f0290078b2e1f3835cb2c6c18dd01076385ee62 100755 (executable)
@@ -17,14 +17,16 @@ fi
 
 to_append=`mktemp`
 to_prepend=`mktemp`
+pts_file_spaced=`mktemp`
 
 for i in $(seq 0 $((`cat $1 | wc -l` - 1)));
 do
-  echo 0' '0 >> $to_append
+  echo "0 0" >> $to_append
   echo $i >> $to_prepend
 done
 
 echo "LANDMARKS1" > $2
-paste -d ' ' $to_prepend $1 $to_append >> $2
+cat $1 | sed -e 's/\s/ /g' >> $pts_file_spaced  
+paste -d ' ' $to_prepend $pts_file_spaced $to_append >> $2
 
-rm $to_append $to_prepend
+rm $to_append $to_prepend $pts_file_spaced