#!/bin/rc rfork en argv0=$0 clear=() fn usage{ echo usage: $argv0 [-c] >[1=2] exit usage } while(~ $1 -*){ switch($1){ case -c clear=1 case * usage } shift } 9fs playlist ramfs if(~ $#clear 0) cp /mnt/music/playlist /tmp/queue cat >>/tmp/queue cp /tmp/queue /mnt/music/playlist