Re: Length of command line input [message #49552 is a reply to message #49551] |
Thu, 03 August 2006 10:47   |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
TimLS wrote:
> I couldn't find the answer to this in the online documentation but
> perhaps someone has seen this before, or can suggest a good work
> around.
>
> I have a procedure which takes lots and lots of keywords, many of which
> are really long filenames, e.g.
> test_program,input1='really_long_filename1',input2='really_l ong_filename2',....
>
> Eventually IDLDE running under linux decides that it has had enough and
> essentially only accepts the first 500 characters (approximately) that
> have been typed into the command line. (Trying to run it as a batch
> file has the same effect).
>
> Is there a limit on the length of the command line, and is it possible
> to extend it anyhow?
Hello,
Dunno about answers to your actual questions (sorry), but in batch mode, can't you recast
things as:
input1='really_long_filename1'
input2='really_long_filename2'
...etc...
test_program,input1=input1,input2=input2,...etc...
Another approach (assuming your other arguments are also similar, i.e. filenames) would be
to do:
input_files=strarr(nfiles) ; however many files you want to process this time
input_files[0]='really_long_filename1'
input_files[1]='really_long_filename2'
...etc...
test_program,input_files=input_files
and then, in your program, test for the size of the input_files keyword after you've
verified it's existence.
?
I am impressed that you've testing the too-long-command-line issue on the command line
itself (500 chars! Cripes.) -- but I think addressing the problem you're having by
modifying your code is a path of much lower resistance.
And, another thing to consider; if you do figure out how to increase the available length
of the command line, is there any guarantee that it will work on a different platform? Or
even a different version of IDL/IDLDE?
paulv
--
Paul van Delst Ride lots.
CIMSS @ NOAA/NCEP/EMC Eddy Merckx
Ph: (301)763-8000 x7748
Fax:(301)763-8545
|
|
|