Hi!
I have the following awk script
1) what would be the best way to do this in Tcl?
There is no option egrep in file copy that I can see.
2) Is there a way to move and "filter" files instead of copying them?
Many thanks!
I have the following awk script
Code:
delfiles = "\\.inp|\\.tmpcgm|\\.lst|\\.log|\\.w1|\\.hzbf|\\.w2|\\.w3|\\.core|\\.tmp|\\zap3workfile|\\tmpcgm|\\hzbf\\."
#file extensions not to copy for ASI
asifiles = "\\.tod|\\.tod_glb|\\.sgy|\\.segy|\\.gbs|\\.ash|\\.gsr|\\.psh|\\.shf|\\.psp|\\.tsp|\\.asp|\\.sess|\\.hts|\\.hzd|\\.2cl|\\.cdf|\\.cdf|\\.zgf|\\.asc|\\.ZGF|\\.dts|\\.mcf|\\.zcm|\\.ptf|\\.mfd|\\.cgm|\\.hzh_glb|\\.hzd_glb|\\.fmt|\\.msc"
#file extensions not to copy for PN and VDG
pnfiles = "\\.3dv|\\.3dh|\\.bri|\\.bri.meta|\\.cmp|\\.cmp.meta|\\.2v2_glb|\\.2v2.scaleFactor_glb|\\.lh_glb|\\.st_glb|\\.xy_glb"
if (asi == 1)
{
nocopy = "'"asifiles"|"delfiles"'"
} else {
nocopy = "'"pnfiles"|"delfiles"'"
}
# copy other data disks
for (iii=1;iii<ndir;iii++) {
dummy=dest_dir"/"SW_proj3D[ii]
if ( system("test -d " dummy) != 0 ) {
system("/usr/bin/mkdir " dummy)
}
dummy2=orig_dir[iii]"/"SW_proj3D[ii]
system("cd " dummy2 " ; find . -print | egrep -v " nocopy " | cpio -pdvmu " dummy " >> " logfile)
}
1) what would be the best way to do this in Tcl?
There is no option egrep in file copy that I can see.
2) Is there a way to move and "filter" files instead of copying them?
Many thanks!