How to close a file and a folder using bash?
The open command opens a file in the default application for that file. To close the file in that application, you will need to control the application to close the file. This will depend on what the application is—not all applications support AppleScript control for example and quitting the app is not the same as closing a file.