Hi,
I'm wondering if I can do the following with sh shell script.
I know I can put a group of commands into background by specifying:
{ cmd1; cmd2; ... ; cmdn ; } &
Now the question is that how can I control whether to put the group of
commands in background by a variable. I.e, I wish I could do sth like
this:
{ cmd1; cmd2; ... ; cmdn ; } ${background_execution-'&'}
Sure the above is not working, but hope you get the idea -- control
whether the group of commands is executed in background by a single
variable. The point is that, if possible, I don't want to duplicate the
group into two branch of if/else clause.
Can I do that? thanks!
-- Tong
Anti-spam: remove underscore(s) to reply.
Welcome to my homepage http://members.xoom.com/suntong001/
- All free contribution & collection
- freeware & music from the heavens