help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Distinguish between octave an non-octave argv?


From: Olaf Till
Subject: Re: Distinguish between octave an non-octave argv?
Date: Tue, 17 May 2011 17:00:44 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Tue, May 17, 2011 at 10:34:29AM -0400, Judd Storrs wrote:
> Hi,
> 
> I'm trying to separate octave vs non-octave command line parameters but it
> seems more difficult than necessary, so I could be missing something. For
> example, consider this simple script (./test-script):
> 
> ./test-script.m:
> #!/usr/bin/octave -qf
> argv
> 
> then:
> 
> $ ./test-script.m test
> ans =
> {
>   [1,1] = test
> }
> 
> which I expect. But things are different when no parameters are provided:
> 
> $ ./test-script.m
> ans =
> {
>   [1,1] = -qf
>   [2,1] = ./test-script.m
> }

With Octave-3.5.0+ from stable, revision 12649:c6378cec77af, I can't
reproduce this:

./test-script.m:
#!/usr/nfs/bin/octave -qf
argv

$ ./test-script.m test
ans = 
{
  [1,1] = test
}

$ ./test-script.m 
ans = {}(0x0)

Olaf


reply via email to

[Prev in Thread] Current Thread [Next in Thread]