CoBrALab / antsRegistration-MAGeT

A reimplementation of MAGeTbrain using only ANTs tools.
Other
16 stars 6 forks source link

Switch to using bash's extglob syntax #40

Closed gdevenyi closed 6 years ago

gdevenyi commented 8 years ago

We can replace our calls to find with bash's new globbing syntax, should happen with #39

> shopt -s extglob
> find input/atlas -maxdepth 1 -name '*_t1.mnc' -o -name '*_t1.nii' -o -name '*_t1.nii.gz' -o -name '*_t1.hdr'
#Becomes
> ls input/atlas/*(*_t1.mnc|*_t1.nii?(.gz)|*.hdr)
gdevenyi commented 8 years ago

Also, stop using ls to generate lists, see http://mywiki.wooledge.org/BashGuide/Arrays

gdevenyi commented 8 years ago

Also, enable nullglob http://mywiki.wooledge.org/glob#nullglob

gdevenyi commented 6 years ago

Fixed.