I have a very simple problem: When I run a shell script I start a program which runs in an infinite loop. After a while I wanna stop then this program before I can it again with
you obtain the pid of app1 with
ps ux | awk '/app1/ && !/awk/ {print $2}'
and then you should be able to kill it....(however, if you've several instances of app1, you may kill'em all)