Tcl question ...

Ryan Schmidt ryandesign at macports.org
Thu Sep 19 04:24:17 PDT 2013


On Sep 19, 2013, at 06:16, Peter Danecek wrote:

> So would like to delete some file (as a pre-patch step) to get a clean source directory before the build. When I put the file names all works fine, but I would like to be less verbose, so I am trying something like this:
> 
> --- snip ---
> [radegast:~/temp/BitArray2D-2.1] petr% tclsh
> % glob */*.pyc     
> Examples/BitArray2D.pyc Examples/BitVector.pyc TestBitArray2D/BitArray2D.pyc TestBitArray2D/BitVector.pyc TestBitArray2D/TestBooleanLogic.pyc TestBitArray2D/TestComparisonOps.pyc TestBitArray2D/TestConstructors.pyc
> % file delete Examples/BitArray2D.pyc Examples/BitVector.pyc 
> % glob */*.pyc
> TestBitArray2D/BitArray2D.pyc TestBitArray2D/BitVector.pyc TestBitArray2D/TestBooleanLogic.pyc TestBitArray2D/TestComparisonOps.pyc TestBitArray2D/TestConstructors.pyc
> % file delete [ glob */*.pyc ]
> % glob */*.pyc
> TestBitArray2D/BitArray2D.pyc TestBitArray2D/BitVector.pyc TestBitArray2D/TestBooleanLogic.pyc TestBitArray2D/TestComparisonOps.pyc TestBitArray2D/TestConstructors.pyc
> --- snap ---
> 
> Deleting the files works, globbing seems to work as well, but when I combine these it has no effect. Where is the error?

"delete" is a MacPorts alias for "file delete" that you should probably prefer.

To combine them you probably need eval:

eval delete [glob */*.pyc]





More information about the macports-dev mailing list