You can actually execute this ( /Applications/Preview.app/Contents/MacOS/Preview) to start Preview directly without going through open, but only certain purpose-built executables will understand command-line arguments. Most applications (like Preview.app in this case) have an executable file somewhere in their application bundle. As you've observed, open doesn't know what to do with most of these.Īnyway, let's dig deeper. So in your example, you were calling open and passing in file.pdf, -args, and -page=5 as arguments. Generally all space-separated "words" you type after a command are treated as arguments for that command, at least until you hit some kind of output redirection or control character like |,, &. To get you started, the man command will get you the manpage for whatever command you pass in. There are plentiful resources out there to get familiar with the bash shell and *NIX command line. When you are using the Terminal application, you are interfacing with a BSD subsystem that follows all the patterns you would expect from a UNIX or Linux operating system. Whether or not that's the case, it is not the case on Mac OS. I had no idea that all Windows applications understood command line arguments.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |