Skip to content

Commit 4f60d79

Browse files
authored
Merge pull request #1845 from ANTsX/strip_cr
ENH: Strip carriage returns from template input csv
2 parents e1ef76f + 2ce1337 commit 4f60d79

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Scripts/antsMultivariateTemplateConstruction.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,7 @@ if [[ ${NINFILES} -eq 0 ]];
734734
IMAGECOUNT=0
735735
while read line
736736
do
737+
line=$(echo "$line" | tr -d '\r') # remove carriage return from python / windows line-endings
737738
files=(`echo $line | tr ',' ' '`)
738739
if [[ ${#files[@]} -ne $NUMBEROFMODALITIES ]];
739740
then

Scripts/antsMultivariateTemplateConstruction2.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,7 @@ elif [[ ${NINFILES} -eq 1 ]];
907907
IMAGECOUNT=0
908908
while read line
909909
do
910+
line=$(echo "$line" | tr -d '\r') # remove carriage return from python / windows line-endings
910911
files=(`echo $line | tr "," "\n"`)
911912
if [[ ${#files[@]} -ne $NUMBEROFMODALITIES ]];
912913
then

0 commit comments

Comments
 (0)