Re: Howto for post/pre-backup-commands
2003-08-24 13:30:30
One more comment ...
Jon LaBadie wrote:
> On Tue, Aug 19, 2003 at 12:17:14PM +0200, Simon Frettloeh wrote:
>
>> ===snip====================
>> REALTAR=/bin/tar
>> exec yourprebackupcommand
>> exec $REALTAR "$@"
>> exec yourpostbackupcommand
>> ===snap====================
>> For a more complex but also more flexible script look at the end of my
>> mail. I hope this one's correct. I'm not so good in shell programming,
>
>
> Just one comment for future reference.
>
> "exec" has a very specific meaning in shell programming and is generally
> a reserved word in the shell programming languages. That makes its use
> inappropriate in the above snippet. Perhaps you mean "execute" which
> is not a special word will convey the notion of "fork off a child process
> to do these activities and return to the parent when completed to do the
> next command in the shell script". In contrast "exec" means to replace
> the shell running the script with whatever you are "exec'ing". After that
> completes there is nothing to "return to", the shell having been replaced,
> and thus there is no possibility of executing the next command in the script.
>
|
|
|