simple unix command implementation using c