Hey all,
I'm running an ubuntu-server with webmin but no GUI. Yaay!
well in CLI mode I knew just how to run 1 command at a time.
so to run two command. i.e. command1 and command2
i would create a bash script like so
the problem is if
command1 never terminates,
command2 is never executed.
after some googling I found out how to run two commands together asynchronously.
It's simple really, for others looking how:
command1 & command2
the ampersand in between makes both/multiple commands execute simultaneously without waiting for first/previous command to finish.
Now the issue is when I run this script, i can't do other day-to-day tasks as CLI is waiting for this scritp to finish, which it never will as command1 and command2 are both never ending commands. they are basically constantly doing something to the system.
bottomline: I have managed to run both commands together but now I can't do anything in CLI as its waiting for my bash script to end.
isn't there a way i can make an application or bash script run in non-blocking mode? to have my CLI free for other things?
a cheat could be to use webmin for executing such scripts but I think ubuntu-server must have a better solution to start never-ending applications, like servers, in the background.
also I would like to autostart this script in non-blocking mode so i don't have to do this everytime, but that's relatively simpler I guess.
any ideas will be greatly appreciated.
Cheers!
Johl