I have a shell script.
Say in script test.sh below are thw two prcoess i launch through script
1.echo execute Test.sh start
2.java process1 > /dev/null
3.java process2 > /dev/null
4.echo execute Test.sh finish
5.exit
Now if i run test.sh, say process1 is running and process2 will kill the process1 based on certain condition, so when it kills the process 1, it outputs , this output i want to redirect.
Now output is execute Test.sh start
test.sh line :2 killed pid java process1 > /dev/null
execute Test.sh finish
I want it to look like below, so how to redirect it.
execute Test.sh start
execute Test.sh finish
I hope i am clear in my question framing now