Write a program to perform set operations.
Bash -- 54 chars

 

case $1 in
1)rm *;w;;
2)&gt;$2;;
3)rm $2;w;;
4)&lt;$2;;
esac


Notes: Outputs to stdout/stderr in some scenarios. Empties working directory when clearing the set. Uses one file for each set element. The purpose of ;w is to exit with status 0.

This appears to comply with all the rules.