I have few java processes running like below,
java -jar /my/path/to/app/myapp.jar
java -jar /my/path/to/app/prodapp.jar
java -jar /my/path/to/app/testapp.jar
java -jar /my/path/to/app/myapp_v.01.jar
Now I can kill a particular process by
pkill -f myapp.jar which is working as expected.
how do I kill myapp_v.01.jar using a regex, I tried
pkill -f myapp_*.jar.
What is wrong with this regex ?
I am not looking for an alternative for
pkill, I wanted to know why is the regex not working.