Oops, not quite correct.

I said bar.rsf is output from sfgrey3.  Actually it is output from sfbyte, and input to sfgrey3...

But I don't think that changes the advice about how to use sfrm in a workflow.

On May 26, 2010, at 11:37 PM, Jim Jennings wrote:

Aaron:

Here is an example I found in an old script:

Result (i,
        '''
        transp plane=12 | transp plane=13 | reverse which=1 |
        byte bar=bar.rsf gainpanel=all pclip=100 wantscalebar=y allpos=%s |
        grey3 title="%s" 
        color=j movie=0 flat=y scalebar=y bar=bar.rsf
        frame1=%d frame2=%d frame3=%d point1=0.5 point2=0.5 > $TARGET &&
        rm -f bar.rsf
        ''' % (allpos,i,par[2]['nz']/2,par[2]['nx']/2,par[2]['ny']/2), 
        stdout=0 )

The command sfgrey3 produces the file bar.rsf as a side effect and sends it's output to $TARGET.  This is followed by a sfrm command to delete the file bar.rsf.

The stdout=0 option prevents Result from putting the normally automatic "> $TARGET" after the sfrm command.  But then "> $TARGET" must be manually added after the sfgrey3 command to send its output to the correct place.

The "&&" puts the sfrm command after sfgrey3 in the same command line without a pipe in between.

On May 24, 2010, at 9:27 AM, Aaron Girard wrote:

I am running an iterative process that builds many rsf files that are combined to make a final rsf file, and, in the interest of disk space, would like to have scons remove the unnecessary  intermediate files before moving to the next iteration.

How does one implement the command 'sfrm' (or bash command 'rm') in the Flow?

Thanks in advance,

Aaron Girard

Master Candidate, Applied Geophysics
IDEA-League Joint Master Program
TU Delft; ETH Zürich; RWTH Aachen
Aaron.J.Girard@gmail.com
+44 7574390513
------------------------------------------------------------------------------

_______________________________________________
RSF-user mailing list
RSF-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsf-user



-- 
Jim Jennings



------------------------------------------------------------------------------

_______________________________________________
RSF-user mailing list
RSF-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsf-user



-- 
Jim Jennings
jenningsjwj@mac.com