[MINC-users] minclookup unexpected behaviour

Paul GRAVEL pgravel at bic.mni.mcgill.ca
Fri Jul 26 17:22:45 EDT 2013


Dear All,

I have this odd behaviour when I run minclookup to extract labels passed 
as a for loop variable (actually the variable is label_no). Basically, I 
did echo my command line with the linux variables inserted to ensure the 
single quotes were properly placed, i.e.:

echo-ing command (were label_no is set to 85):
echo minclookup -discrete -lut_string "'$label_no $label_no'" 
$source_dir/$subject/'qfal_'$subject'_OFC_and_PFC_ROIs_dynPET1_space.mnc' 
$source_dir/$subject/'qfal_'$subject'_OFC_and_PFC_ROIs_dynPET1_space_label_no'$label_no'_tmp.mnc'

Output:
minclookup -discrete -lut_string '85 85' 
/hrrt/hrrt5/pgravel/Studies/Qfal/017/qfal_017_OFC_and_PFC_ROIs_dynPET1_space.mnc 
/hrrt/hrrt5/pgravel/Studies/Qfal/017/qfal_017_OFC_and_PFC_ROIs_dynPET1_space_label_no85_tmp.mnc


So, if I copy/paste this output directly in linux, it does work fine. 
However, when I call the command directly without echo-ing, which is the 
whole purpose of this exercise ;-), i.e.:

minclookup -discrete -lut_string "'$label_no $label_no'" 
$source_dir/$subject/'qfal_'$subject'_OFC_and_PFC_ROIs_dynPET1_space.mnc' 
$source_dir/$subject/'qfal_'$subject'_OFC_and_PFC_ROIs_dynPET1_space_label_no'$label_no'_tmp.mnc'

I get the following error:
First line has fewer than 2 values.

which I can't figure out... am I missing something?

As always, any help will be greatly appreciated!

Best Regards,

Paul


More information about the MINC-users mailing list