Command line parameters?

Kevin nnoydb at excite.com
Thu Mar 11 03:47:28 EST 2004



Thanks for the suggestion but I do not believe this will function on non *NIX platforms.  I really need a multiplatform solution since I expect my applications to run on MSWindows and several*NIX platforms (a requiredment of the product).


Kevin


-==-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-
Disclaimer:

Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
coincidental. 
Any resemblance between the above and my own views is non-deterministic.

 The question of the existence of views in the absence of anyone to hold
them
is left as an exercise for the reader. The question of the existence of
the reader
 is left as an exercise for the second god coefficient. 
(A discussion of non-orthogonal, non-integral polytheism is beyond the
scope of this article.)



 --- On Thu 03/11, James Cass < cassj at earthlink.net > wrote:
From: James Cass [mailto: cassj at earthlink.net]
To: nnoydb at excite.com, use-revolution at lists.runrev.com
Date: Thu, 11 Mar 2004 03:35:44 -0500
Subject: Re: Command line parameters?

Kevin -<br><br>The environment variable you're looking for is:  $#<br>For example, if I had this little shell script called "args.sh"<br><br>	#!/bin/sh<br>	echo Number of arguments passed is $#<br>	for arg in "$@"<br>	do<br>   	  echo $arg<br>	done<br><br>and passed it this:<br>	args.sh 1 2 3 4 5<br><br>it would return this:<br><br>	Number of arguments passed is 8<br>	1<br>	2<br>	3<br>	4<br>	5<br><br>Hope this helps....James<br><br><br>On Mar 11, 2004, at 2:14 AM, Kevin wrote:<br><br>><br>><br>> I am unable to locate a construct that would provide the number of <br>> parameters that have been passed via the command line.  I am aware of <br>> $0 ... $n but how does one know how many there are a how would I loop <br>> through them?<br>><br>> Kevin<br>><br>><br>> -==-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-<br>> Disclaimer:<br>><br>> Any resemblance between the above views and those of my<br>> employer, my terminal, or the view out my window are purely<br>> coincidental.<br>> Any resemblance between the above and my own views is <br>> non-deterministic.<br>><br>>  The question of the existence of views in the absence of anyone to <br>> hold<br>> them<br>> is left as an exercise for the reader. The question of the existence of<br>> the reader<br>>  is left as an exercise for the second god coefficient.<br>> (A discussion of non-orthogonal, non-integral polytheism is beyond the<br>> scope of this article.)<br>><br>><br>><br>> _______________________________________________<br>> Join Excite! - http://www.excite.com<br>> The most personalized portal on the Web!<br>> _______________________________________________<br>> use-revolution mailing list<br>> use-revolution at lists.runrev.com<br>> http://lists.runrev.com/mailman/listinfo/use-revolution<br>><br><br>

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


More information about the use-livecode mailing list