[Thread Prev][Thread Next][Index]

Re: [ferret_users] ferret -script dir/script.jnl



Hi Ryo,
Yes, this does seem to be somewhat of a bug in reading the arguments on the Ferret startup line, and sending them on to Ferret. Using the absolute path name rather than relative path name, does seem to work

  $ ferret -script /home/machine/ansley/tmp/hello.jnl  [arguments]

Another workaround is to create a short script in the local directory, run_script.jnl which just runs the script you want.

 ! run_script.jnl
 ! To run a specified script, specified with relative or absolute path
 ! Argument 1 is the script name

 GO "$1"
 exit

Then you can run Ferret in script mode, and pass the name of the script you want to run as follows:

 $ ferret -script run_script.jnl tmp/hello.jnl  [arguments]

For some reason the command-line reading does not have a problem with specifying tmp/hello as an argument to the script run_script.jnl.

Ansley


Ryo Furue wrote:
Hi Ferreters,

I'm wondering if this is a bug in Ferret.  Basically,
I've been trying to use Ferret like this

     ferret -script dir/script.jnl

unsuccessfully, so far.  Here's a transcription of a session
to illustrate the problem (where the "$"s are the shell prompts):

  $ echo say hello > hello.jnl
  $ /usr/local/ferret-6.0/bin/ferret_v600 -script hello.jnl
  hello
  $ mkdir tmp
  $ echo say hello > tmp/hello.jnl
  $ /usr/local/ferret-6.0/bin/ferret_v600 -script tmp/hello.jnl
   **TMAP ERR: non-existent or not on line
               /tmp
  GO tmp/hello.jnl
  Command file, command group, or REPEAT execution aborted
  STOP -script mode, ERROR RUNNING SCRIPT statement executed
  $

I've also tried
   . . . -script \'tmp/hello.jnl\'

and

   . . . -script \"tmp/hello.jnl\"

but neither works.

I'm using Ferret 6.0 on a Debian GNU/Linux machine.

Regards,
Ryo

--

~> ~> ~> ~> ~> ~> ~> ~> ~> ~> ~>
Ansley Manke, NOAA/PMEL   ansley.b.manke@xxxxxxxx
7600 Sand Point Way NE, Seattle WA
Phone 206-526-6246,  FAX 206-526-6744




[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement