[Thread Prev][Thread Next][Index]

Re: [ferret_users] ferret -script with history

Ryo Furue a écrit :

| I am wondering how to launch ferret with a pre-existing script and get
| a prompt AND history ready to use ?
| | If myscript.jnl is the simple script bellow:
| say "We are in 2009"
| exit/prompt
| | Then if I type
| ferret -script myscript.jnl
| I launch ferret and run the script, get the prompt BUT no history | features (use of arrows up/down). | | Any idea on how to get the load of a script at starting ?

Does this meet your needs?

  $ ferret
        FERRET v6.02
        Linux(g77) 2.4.21-32 - 04/30/07
        21-Jan-09 11:57

  yes? go myscript.jnl
  say "We are in 2009"
  We are in 2009
Probably you don't need "exit/prompt" in this case.
Yes you need this line to get the prompt back and be ready to use ferret with the loaded script.
Another idea is that you write a shell script like

  mv $rc $rc_bak
  cat $rc_bak "$1" > $rc
  ferret "$@"
  rm $rc
  mv $rc_bak $rc

call it, say, "ferret-init-with", and use it as

  $ ferret-init-with myscript.jnl . . . .
Seems not so easy to implement if I have heterogeneous platform users (Linux and Windows).

What about this feature for next release...

[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement