Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Pipe to Safari from stdin' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Pipe to Safari from stdin
Authored by: nxg on Dec 02, '05 07:46:45AM

The first case _is_ reading from stdin: note the angle-bracket before the file.html. That redirects stdin to come from the file. This is similar to

% cat file.html | open -a /Applications/ -f

but without the extra process. Also it's a standard unix idiom.

As regards the temporary .txt file: this a bit clunky -- I'd have thought a named pipe would be cleaner. But then, it wasn't me implementing it.

I also think this is a bit of a red herring, since it's clear from some of the examples that work that Safari _is_ sniffing the content (otherwise the `Moo' examples wouldn't work), just not very well, or not completely successfully. Allowing a MIME type would be more robust.

[ Reply to This | # ]
Pipe to Safari from stdin
Authored by: Afuna on Dec 02, '05 08:28:15AM

Sorry about that. It was taking a long time to open in Safari, and I wrongly assumed that it was waiting for something, so I used ctrl-c to interrupt the process after a few seconds.

Just tested it now and actually _waited_ until it finished, and I see what you mean now.

[ Reply to This | # ]