Finding the process ID from the given command names