AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
Daniel Glen
July 29, 2008 05:34PM
You can use $status to see the status of an executed command (to see if there was an error or not). So normally $status will be 0 if a program exits without an error and something else if there is an error. Unfortunately 3dinfo doesn't exit with an error for non-existent datasets. A fix for that will be included in a future distribution, possibly the following this posting. In the meantime, it's fairly simple to get around that by using grep to find a specific string in the output with something like this.

% 3dinfo aklsjflkjas | & grep "Can't open"
*+ WARNING: Can't open dataset aklsjflkjas
% echo $status
0
% 3dinfo aklsjflkjas | & grep "Can't open"
*+ WARNING: Can't open dataset aklsjflkjas
% @ stat = ! $status
% echo $stat
1
Subject Author Posted

AFNI data set check program

Ariel Kanevsky July 29, 2008 12:52PM

Re: AFNI data set check program

Daniel Glen July 29, 2008 05:34PM