I was hoping to concatenate 186 3D+time datasets into one big 3D+time dataset. Their names are “Z_EC_thalamus_1” “Z_EC_thalamus_2” “Z_EC_thalamus_3” “Z_EC_thalamus_4” “Z_EC_thalamus_5” … How can I use 3dTcat to simply concatenate them? I don’t want to print all 186 names in one command.
ps: and that should concatenate them in the numerical order they are listed. Note that you might run into trouble if you want
Z_EC_thalamus_3 before Z_EC_thalamus_11-- the latter will come first, because the numbers aren’t zeropadded, such as Z_EC_thalamus_003 and Z_EC_thalamus_011, where “*3” would be earlier in the listing.
You will be able to see the ordering of the files in the header file’s history. Does the order matter for you?
Yes, it does look like the lack of zero padding might be a problem.
Assuming so, you can get around that by generating all of the
names (tcsh syntax). Start with a list of those integers, convert
spaces to commas, and use {} for the list generation. So try:
set nums = ( `count -digits 1 1 186` )
set clist = `echo $nums | sed 's/ /,/g'`
3dTcat -prefix Z_EC_thalamus_ALL Z_EC_thalamus_{$clist}+tlrc
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.