questions > RE: dcm2niix cannot find dicoms in files with wildcards within script
Sep 10, 2019  05:09 AM | Chris Rorden
RE: dcm2niix cannot find dicoms in files with wildcards within script
Hello

This is the intended behavior, and is consistent with other executables on your computer. Interactive and non-interactive BASH shells do not behave the same, in particular with respect to globbing. A general web search will provide more information on this. In many situations, adding "shopt -s extglob" to a script can make a non-interactive script act more like an interactive shell. You will also want to be careful how you distinguish your escape characters from file separators (use of quotes and //).

Since your question is general to Unix scripts rather than dcm2niix, you may get better advice asking this question on a more domain general forum (e.g. StackOverflow) using a less domain specific tool. Your question is beyond the scope of this forum, as this is a Unix scripting question not a dcm2niix question. I have very little expertise with Unix scripts, and that is probably true of most of the people who follow this forum.

Threaded View

TitleAuthorDate
sciencecasey Sep 9, 2019
RE: dcm2niix cannot find dicoms in files with wildcards within script
Chris Rorden Sep 10, 2019