#!/bin/sh

SIZE_MB=${1:-1024}
SECTORS=$((${SIZE_MB}*1024*1024/512))

diskutil erasevolume HFS+ "RamDisk" `hdiutil attach -nomount ram://${SECTORS}`