; inpfile="lists/proj.allfixed" n=readasciifile(inpfile,inp) a=stregex(inp,"^(.*\/)(.*)",/ext,/sub) ii=where(a[2,*] ne '',ntot) pnmAr=reform(a[1,*]) bnmAr=reform(a[2,*]) upnmar=pnmAr[uniq(pnmar,sort(pnmar))] ; ; find realnames for the 900 upnmar ; ofile='lists/upnmar.dat' openw,lunout,ofile,/get_lun printf,lunout,upnmar,format='(a)' free_lun,lunout ; ; kludge to get the current directory ; cd,'/tmp',current=cwd cd,cwd cmd=cwd + "/pnmtohwnm.sc " +ofile spawn,cmd,hwnmar iis=sort(hwnmar) hwnmars=hwnmar[iis] upnmarS=upnmar[iis] n=n_elements(upnmars) cntAr=intarr(n) i0=0l for i=0,n-2 do begin &$ if (hwnmarS[i] eq hwnmarS[i0]) then begin &$ cntAr[i0]++ &$ endif else begin &$ cntAr[i]=1 &$ i0=i &$ endelse &$ ; print,i0,i,cntAr[i0] &$ endfor ; ; do the last separately ; if (hwnmarS[n-2] ne hwnmars[n-1]) then cntAr[n-1]=1 iidup=where(cntar eq 0,ndup) ver,-1,3 plot,cntAR,psym=1 if ndup gt 0 then begin print,upnmars[iidup] endif else begin print,"no dup dir found" stop endelse ; ; exlude dir,files that are dups ; n=n_elements(pnmar) ok=intarr(n) + 1 for i=0,ndup-1 do begin &$ ii=where(pnmar eq upnmar[iidup[i]],cnt) &$ if cnt gt 0 then ok[ii]=0 &$ endfor ii=where(ok eq 1,cnt) ; pnmarg=pnmar[ii] bnmarg=bnmar[ii] projg=pnmarg + bnmarg ; openw,lunout,"lists/proj.allfixedu",/get_lun printf,lunout, projg,format='(a)' free_lun,lunout cmd='cat lists/proj.allfixedu |wc' spawn,cmd,reply print,"files proj.allfixedu:",reply end &$