On 03/16/2011 04:54 AM, Barrie Stott wrote:
> The script that follows is a cut down version of one that came from elsewhere.
> 
> #!/bin/bash
> 
> cp /tmp/x.html /tmp/$$.html
> ls /tmp/$$.html
> [ "$DISPLAY" ] && open /tmp/$$.html
> ls /tmp/$$.html
> rm -f /tmp/$$.html

Instead of passing Safari the name of a temporary file, why not pass it
the name of a temporary pipe?  Does this work any better:

[ "$DISPLAY" ] && open <(cat /tmp/x.html)

at which point there's no temporary file to remove.

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to