http://gearbox.maem.umr.edu/batch/awk.scripts.time1.html Environmental variables DOS and gawk\ This FILE: do-all-awking.txt ( actually this file contains all the main seding, awking and batching scripts to get AFS addfreestats javascript into all my web pages for remote visitor stastics gathering and tracking. ) FILE: crlf-top.bat below contains the following two one line scripts: type %1 | ssed -e "1{s/[0-9a-zA-Z!-/:-@[-`{-~]*/\n\r\n\r&/;}" > %1 edit %1 type %1 | ssed -e "//,//d" > %1 edit %1 type %1 | ssed -f %2 > %1 FILE: call-crlf-top.bat contents: call crlf-top.bat c:\users\chris-m\todays-visitors.html c:\users\chris-m\todays-visitors.sed MAKE-B~1 AWK 500 04-15-04 6:18a make-blk-files.awk gawk -f make-blk-files.awk < remaining-files > op-bat-blks.bat op-bat-blks.bat< MAKE-A~1 AWK 1,182 04-15-04 5:39a make-afs-do-final.awk gawk -f make-afs-do-final.awk < remaining-files > make-do-final.bat make-do-final.bat< "type ttw.html | ssed -f ttw.sed > ttw.html" :: Useful sed documentation files on the internet :: U-SED-IT.1, REGEXP.1, REFORMAT.INF, SFILES-A.1, :: SFILES-B.1, and SED.EXE. :: How To Delete All But The 10 Newest Files In The Current Directory :: This can be done very easily with SED... :: Dir /O-D /A-D /-P /B | Sed -n "11,$ s/.*/Del &/w %TEMP%.\_TMP0_.BAT" Dir /O-D /A-D /-P /B | Sed -n "11,$ s/.*/Dir &/w %TEMP%\_TMP0_.BAT" :: For %%C In (Call Del) Do %%C %TEMP%.\_TMP0_.BAT :: For %%C In (Call dir) Do %%C %TEMP%\_TMP0_.BAT :: For %%V In (call dir) Do %%V %TEMP%\_TMP0_.BAT :: For %%V In (c:) Do %%V %TEMP%\_TMP0_.BAT For %%V In (%%1 %%2) Do TYPE %%V %TEMP%\_TMP0_.BAT error too many param's For %%V In (call dir) Do %%V %TEMP%\_TMP0_.BAT :: "type ttw.html | ssed -f ttw.sed > ttw.html" "gawk -f make-call-crlf-top.awk < remaining-files > do-crlf-top.bat" "copy call-crlf-top.bat a:\grep32" "copy make-call-crlf-top.awk a:\grep32" "copy do-all-awking.txt a:\grep32" "copy do-crlf-top.bat a:\grep32" "copy crlf-top.bat a:\grep32" "copy make-afs-do-final.awk a:" "copy make-call-crlf-top.awk a:"