Skip to content

AFNI and NIfTI Server for NIMH/NIH/PHS/DHHS/USA/Earth

Sections
Personal tools
You are here: Home » AFNI » Documentation » FAQs » What are "Arg list too long" messages?

What are "Arg list too long" messages?

Document Actions
Up to table of contents

Q32. What are "Arg list too long" messages?
Errors like this occur when you create a command line that is larger than the operating system allows. This is a particular problem on SGI IRIX systems. If the problem is arising with to3d, one way around it is to use internal wildcard expansion on the input filenames - see Q12.

If the problem is that you want to input a lot of files to a statistics program, such as 3dRegAna, another approach is needed. If you make the last option on the command line be "-@", then the program will copy the contents of standard input (stdin) to the tail of the command line. (This feature is part of the AFNI package, not a part of Unix.) You can use this in one of two ways:

  • 3dRegana -@ < filename

    where filename contains the information to copy onto the command line. (This file may have linebreaks -- it doesn't have to be one big line. No line should have over 4000 characters, though.)

  • 3dRegana -@ << ENDSTRING
    options
    more options
    ....
    ENDSTRING

    This method uses a feature of the shells csh and sh, where the standard input of the program is read from the input file (rather than the user's terminal) up until a line that matches the characters just to the right of the "<<" -- in this case, I've used "ENDSTRING" as this marker. An advantage of this method is that the inputs for the program are in the same shell script that you are using to run the program, rather than being in a separate file. If you choose to use this technique, a glance at the man pages for your shell of choice would be in order.

This "-@" method was implemented 22 Feb 1999, and so is still experimental. At this moment, it has only been retrofitted into program 3dRegAna.

[20 Apr 2001]: This method is now implemented into the following programs:

3dANOVA2 3dANOVA3 3dANOVA 3dbucket 3dcalc
3dDeconvolve 3dDetrend 3dfim 3dfim+ 3dFriedman
3dKruskalWallis 3dMannWhitney 3dmaskdump 3dMean 3dmerge
3dNLfim 3dOverlap 3dpc 3drefit 3dRegAna
3dROIstats 3drotate 3dStatClust 3dTcat 3dttest
3dUndump 3dvolreg 3dWavelets 3dWilcoxon to3d
If there is a program missing from this list for which you need this functionality, please let me know. It only requires pasting 4 lines of C code into the program to add this capability.

Note Well: Each group of characters read in by "-@" separated by "whitespace" (blanks, tabs, newlines) will be appended as a separate argument to the program.

  • In particular, you cannot embed a blank in an argument using quotes, unlike if the argument were actually on the command line.
  • The shell does not do filename expansion (globbing) on "-@" data, so you do not escape or quote wildcards such as the *?[] characters.
  • If you use the "<<" input method described above, the shell does do $ variable expansion on the input lines, so any dollar signs in the input stream need to be escaped with the backslash \ character: \$ (that is, unless you want shell variables to be expanded there).
  • Not all the above programs have been tested with "-@"; please let me know if there are any problems.


This FAQ applies to: Any version.

Created by Robert Cox
Last modified 2005-07-31 23:13
 

Powered by Plone

This site conforms to the following standards: