9
rated 0 times
[
9]
[
0]
/ answers: 1 / hits: 19883
/ 1 Year ago, mon, february 13, 2023, 6:16:57
I need to run a program in the background. I know that using '&' after a command runs the command in the background.
In the following script:
#!/bin/bash
echo amt of time delay nsec
read nano
echo amt of time delay in sec
read sec
echo no.of times
read i
while [ $i -ne 0 ]
do
./nanosleep $sec $nano
./schello
i=$[i-1]
done
I have a few data that I get from the user. Is there a way I can run the program in background and while calling the program can I also specify the data required (like nano, sec,i) as arguments or through some other way?
More From » bash