Background job issue

How to bring a backgroud job say sample_script.sh to foreground

# List jobs:
jobs
# Bring them to the foreground:
fg <job-id>

Such information is really easy to find on the www.

1 Like

sample.sh is a parameterized script.

sample.sh $account_num

i will execute this script in for loop and needs to bring it in the for ground for every account number

How can i do it?

e.g. The UNIX and Linux Forums - Where There is a Shell There is a Way!

Why bother with other sources?

I don't understand. With your command above, sample.sh WILL run in FG!

Thanks for the reply..bip.sh is designed to run in background .It is parameterized
script. It takes an account number as an input.For every account number it generates an unique number which needs to passed to another script and execution time of each bip.sh $accoun_num is different.
So how can i make sure that runXitInvoice_PROFORMA_integ begins execution only after bip.sh $accoun_num is finished its execution.
currently i am using sleep 100 but it is not efficient.