I am trying to get the elapsedCpu time for a certain process using adb commands. I am using this command in order to get some info about the com.example.android process
adb shell cat /proc/1234/stat
(1234 is the PID of com.example.android)
The output result looks like this:
24334 (gdev.loadtester) S 490 490 0 0 -1 6545623 65464564 0 1 0 888 999 0 0 20 549351656579 549351656579 549351657438 0
I am only interested in the 14th group of numbers, that being 888. How do i trim this output in order to extract only this number, so that I have 888 as a result of the command. Each group of chars will always be separated by a space.