#!/bin/bash

while [ -d /proc/$1 ] ; do cat /proc/meminfo | grep -i memfree; sleep 1; done
