Re: Problem with open and rm

2011-03-17 Thread Chet Ramey
On 3/17/11 3:55 AM, Barrie Stott wrote: > Eric Blake suggested using '[ "$DISPLAY" ] && open <(cat /tmp/x.html)' so > that rm > is not needed. I liked this but it failed with some error message and sleep > worked. It didn't work because LaunchServices could not find the right application to ope

Re: Problem with open and rm

2011-03-17 Thread Barrie Stott
On 16 Mar 2011, at 18:42, Greg Wooledge wrote: > On Wed, Mar 16, 2011 at 10:54:15AM +, 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 /

Re: Problem with open and rm

2011-03-16 Thread Bob Proulx
Barrie Stott wrote: > The script that follows is a cut down version of one that came from > elsewhere. Thank you for your bug report but neither 'open' nor 'rm' have anything to do with bash. This is not a bug in the bash shell. This mailing list is for bug reports in the bash shell. > cp /tmp/

Re: Problem with open and rm

2011-03-16 Thread Eric Blake
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 th

Re: Problem with open and rm

2011-03-16 Thread Ken Irving
On Wed, Mar 16, 2011 at 10:54:15AM +, 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 > > I'm on

Re: Problem with open and rm

2011-03-16 Thread Greg Wooledge
On Wed, Mar 16, 2011 at 10:54:15AM +, 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 > If I com

Re: Problem with open and rm

2011-03-16 Thread Micah Cowan
(03/16/2011 03: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 > > I'm on an Imac with OS X

Problem with open and rm

2011-03-16 Thread Barrie Stott
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 I'm on an Imac with OS X 10.6.6. If I run the script as it stands, the open tries to open