Patrick,
| 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
NOAA/PMEL TMAP
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
exit/prompt
yes?
Probably you don't need "exit/prompt" in this case.
Another idea is that you write a shell script like
#!/bin/sh
rc=$HOME/.ferret
rc_bak=$HOME/.ferret-bak
mv $rc $rc_bak
cat $rc_bak "$1" > $rc
shift
ferret "$@"
rm $rc
mv $rc_bak $rc
call it, say, "ferret-init-with", and use it as
$ ferret-init-with myscript.jnl . . . .