[Thread Prev][Thread Next][Index]

Re: [ferret_users] ferret -script with history



Hi Patrick,

| > Does this meet your needs?
| >
| >   $ ferret
[. . .]
| >   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.
| >   
| Yes you need this line to get the prompt back and be ready to use
| ferret with the loaded script.

But I said "in this case".  Do you still need exit/prompt
if the script is loaded by a "GO" command within Ferret?
History does work "in this case" for me after the loading.

In any case, judging from your response, loading your script
using the GO command doesn't seem to be your option.

| > 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 . . . .
| >   
| Seems not so easy to implement if I have heterogeneous platform users 
| (Linux and Windows).

I may be wrong, but I have an impression that Ferret runs on Cygwin
on Windows.  If so, the same shell script should work for all users
(including Mac, which is a Unix, too).

Even if Ferret doesn't use Cygwin on Windows, all you'd have to do
is to write just two scripts, one for Linux and Unix and another for
Windows. . . .

Regards,
Ryo


[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement