-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmove_anat_slicesdirs.sh
24 lines (24 loc) · 1.12 KB
/
move_anat_slicesdirs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /Users/CN/Documents/Projects/Joystick_Cereb_MRS/bin/mrsi_code/env python
# ------------------------------------------------------------------------------
# Script name: move_anat_slicesdirs.sh
#
# Description: Move anats defacing reports to seperate folder, to ensure they are not shared
#
# Author: Caroline Nettekoven, 2020
#
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# bold_dir="/Users/CN/Documents/Projects/BOLD_study_local/deidentification/example_subject/"
bold_dir="/vols/Data/devcog/projects/BOLD"
# ------------------------------------------------------------------------------
bold_dir="/vols/Data/devcog/projects/BOLD"
for sub in ${bold_dir}/sub-*; do
echo "Moving subject ${sub}..."
for directory in `ls -d ${sub}/anat/slicesdir*`; do
if [ ! -f ${bold_dir}/anat_originals/${directory#*anat/} ]; then
mv ${directory} ${bold_dir}/anat_originals/${sub##*BOLD/}_${directory#*anat/}
else
echo "Directory ${directory} ALREADY EXISTS"
fi
done
done