AFNI Nation,
While I know you can use 3dinfo to inspect a dataset, I was wondering if there exists an AFNI program that can check to see if a file is a valid AFNI dataset. The reason for doing this is for some of my scripts to have a possible fail safe before they start trying to act on files.
I tried something like...
if ( `3dinfo $file |& grep '*+ WARNING' != "" ) then
exit
endif
but my argument for my if statement is that there is "No match" while trying it at the command line without backquotes seems to read a faulty 3dinfo execution just fine. How do I accomplish this?
-Ariel