Commit de4646db authored by Fidel Alfaro Almagro's avatar Fidel Alfaro Almagro
Browse files

Simplifying the code

parent e6be3122
......@@ -28,53 +28,20 @@ direc=$1
cd $direc
#Setting the string of NaN in case there is a problem.
result1="NaN"
result2="NaN"
result3="NaN"
result4="NaN"
result5="NaN"
result6="NaN"
result7="NaN"
result8="NaN"
result=""
if [ -f ASL/CBF_gm_mean.txt ] ; then
result1=`cat ASL/CBF_gm_mean.txt`
fi
if [ -f ASL/ATT_gm_mean.txt ] ; then
result2=`cat ASL/ATT_gm_mean.txt`
fi
if [ -f ASL/CBF_wm_mean.txt ] ; then
result3=`cat ASL/CBF_wm_mean.txt`
fi
if [ -f ASL/ATT_wm_mean.txt ] ; then
result4=`cat ASL/ATT_wm_mean.txt`
fi
if [ -f ASL/CBF_pvcorr_gm_mean.txt ] ; then
result5=`cat ASL/CBF_pvcorr_gm_mean.txt`
fi
if [ -f ASL/ATT_pvcorr_gm_mean.txt ] ; then
result6=`cat ASL/ATT_pvcorr_gm_mean.txt`
fi
if [ -f ASL/CBF_pvcorr_wm_mean.txt ] ; then
result7=`cat ASL/CBF_pvcorr_wm_mean.txt`
fi
if [ -f ASL/ATT_pvcorr_wm_mean.txt ] ; then
result8=`cat ASL/ATT_pvcorr_wm_mean.txt`
fi
result="$result1 $result2 $result3 $result4 $result5 $result6 $result7 $result8"
for x in "CBF_gm" "ATT_gm" "CBF_wm" "ATT_wm" "CBF_pvcorr_gm" "ATT_pvcorr_gm" "CBF_pvcorr_wm" "ATT_pvcorr_wm" ; do
f="ASL/${x}_mean.txt";
if [ -f $f ] ; then
result="$result `cat $f`"
else
result="$result NaN"
fi
done
mkdir -p IDP_files
echo $result > IDP_files/$scriptName.txt
echo $result
cd $origDir
\ No newline at end of file
cd $origDir
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment