MacOS – “open -t” vs. “open -ef”

command linemacosterminal

the Command:

syslog | tail | open -ef

works perfectly on my osx 10.8.5 and opens the required lines from syslog in textEdit, however when I run

syslog | tail | open -t

which should open the same lines in my default text editing program I get nothing and just the lines –No lines in buffer–

I am using MacVim as my default text editor.

Best Answer

The pipe (|) connect the standard output of a program to the standard input of another program. open does not read from stdinby default but from a file given as argument. It needs the -foption to read from the standard input.

That's why your first example work but not your second one.

syslog | tail | open -tf works well.