Re: source from within a script

From: Bob (bob_at_dont.spam.me)
Date: 06/13/04


Date: Sun, 13 Jun 2004 18:17:55 GMT

On Sun, 13 Jun 2004 17:12:40 +0200, Bishara Sabbagh wrote:

OK,

I'm not sure exactly what you are doing above and beyond the example I
gave earlier, but let's just try a completely new approach. Instead of an
alias, try using a function:

        echo -n "enter alias... "
        read fnc command
        eval function $fnc \{ $command \; \}
        export -f $fnc

Now another script should be able to use the function.