Is there an inverse command to open in the Terminal?

By using open, I can open a file via terminal.

For example:

$ open ~/Documents/notes.pdf

opens the file notes.pdf in the Documents folder of my home directory. It shows up as a window. Now I'm wondering:

Is there an opposite terminal command with which I can close the opened window (besides kill <pid>)?


Use AppleScript via osascript

 osascript -e 'quit app "Preview"'