Skip to content

Instantly share code, notes, and snippets.

@alxndrkalinin
Last active August 29, 2015 14:22
Show Gist options
  • Save alxndrkalinin/5eaf95137676630489b9 to your computer and use it in GitHub Desktop.
Save alxndrkalinin/5eaf95137676630489b9 to your computer and use it in GitHub Desktop.
Count nucleoli in the directory with nuclei
for i in $(ls | egrep '*g000_mask-[[:digit:]]{3}\.nii.gz'); do
m=${i%.nii.gz};
echo $m;
mm="$m-nucleoli-[[:digit:]]{4,10}\.nii.gz$";
nn=$(ls | egrep $mm | wc -l);
echo $nn;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment