What does a Script do to Windows text files?

Paul Batt redaktion@pbatt.ch
Fri Dec 31 00:03:00 GMT 2004

Does a cygwin bash script (or awk) alter text files? I use a little script
someone gave me in cygwin to add a line to a number of Windows text files:

for F in *.txt
   awk '{if (NR==7) {print "Datei: " FILENAME};
         print}' "$F" > tmp.txt
   mv tmp.txt "$F"

It works, but it does *something* else to my text files. It seems to alter
all the linefeeds or all the blank lines. This causes problems when I want
to import those text files into Asksam later on. The files *look* the same,

Paul Batt, Redaktion Baublatt, Schützenrain 23, 8047 Zürich 
Tel. +41 (1) 242 39 76 Fax +41 (1) 242 20 94 Mobile +41 (0)79 318 64 58
E-Mail paul.batt@baublatt.ch Web http://www.pbatt.ch

Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

More information about the Cygwin mailing list