3

Berkeley Logo User Manual tells that all command line arguments after a hypen will be collected in the variable:

If a command line argument is just a hyphen, then all command line arguments
after the hyphen are not taken as filenames, but are instead collected in a
list, one word per argument; the buried variable COMMAND.LINE contains that
list of arguments, or the empty list if there are none.  On my Linux system,
if the first line of an executable shell script is
#!/usr/local/bin/logo -
(note the hyphen) then the script can be given command line arguments and
they all end up in :COMMAND.LINE along with the script's path.  Experiment.

I try it, and it doesn't work:

$ cat test.lg
#!/usr/bin/logo - 
print :COMMAND.LINE

$ ./test.lg 
I can't open file -
? 

Is there any ideas what's wrong?

I use ucblogo 5.5-2.1 from Ubuntu packages.

Steven Doggart
  • 43,358
  • 8
  • 68
  • 105
tse
  • 5,769
  • 6
  • 38
  • 58

1 Answers1

2

Berkeley Logo 5.5 does not support parsing of command line arguments from a script.

The User Manual you quoted is for Berkeley Logo version 6. You should be able to use command line arguments just like that using ucblogo-6.0.

You can download Berkeley Logo 6.0 from http://www.eecs.berkeley.edu/~bh/

Juan Cespedes
  • 1,299
  • 12
  • 27