I have a text file with the following data:
JVM Heap Info: Sat Sep 14 03:40:30 MDT 2013
JVM Memory Information:
maxMem: 4,263,706,624 (4,163,776k)
totalMem: 4,263,706,624 (4,163,776k)
freeMem: 3,169,325,008 (3,095,043k)
usedMem: 1,094,381,616 (1,068,732k)
availableProcessors: 64
From the text file, I need to get the used memory value (1,094,381,616) and store it in a variable so that I can use it for further processing. Can anyone please let me know how to accomplish this using batch commands?
You can extract the value from the text file like this:
Call the script with the path to the file: