I need access to the current amount of free RAM for a script I’m writing. I’d like to use ‘do shell script: “top | grep PhysMem”’ or something and then go from there, but the problem is that top constantly updates the info which makes it hard to use it in a script. If there is any way to get top to simply print the current info once and then quitting or any other method of getting the current free ram, it would be great.
Any help appreciated.