I'm running  shell script that will often run 'unattended' (batch),
however, for testing and future flexablity, I wish to add an **option** (cmdline
arg) to, after defining the utils of the lib, enter normal interactive mode,
so the user could invoke the library calls from the cmdline, set or change
variables , and then either exit the script entirely, OR continue it's execution.
Obviously, when in interactive mode, it run the user's commands and then 
default
to going back to the prompt.   But if the script is invoked normally -- 
it would be
have as a normal script with no interactivity...

What I'd like to do, is something along the lines of
starting 'readline' have it read in my current ENV's idea of history, (append to it),
and be exactly as though it was a normal interactive shell...

I tried somethind with 'read/eval', but there seems to be no way, even
using read -e, to get to really use the same instance of readline as
it would interactively...


Maybe I'm going about this all wrong, but is this a deadend?



Reply via email to