Mac User, Help with command lines

Trying to save an image with slices, I have got the basic format, my only problem is I am getting the error:
“A document is needed before --save-as argument” . I am not sure how to properly reference the document. Anyone know how to reference on a mac?