November 2012
Intermediate to advanced
424 pages
11h 59m
English
| Tip 330 | Pass Command-Line Output to GUI Apps |
This is a tip for hardcore command-line fans who like a little graphical user-interface goodness in their lives.
As mentioned elsewhere, you can use the open command at the command line to open files in GUI applications (Tip 325, Start GUI Apps from the Command Line). The command open filename.txt will open filename.txt in TextEdit, for example.
However, the -f command-line switch will cause open to accept output piped from a command. For example, the following will pipe a detailed directory listing in a new document within TextEdit:
| | ls -la | open -f |
To choose an application other than the default, specify it using the -a switch. ...
Read now
Unlock full access