delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/12/30/19:03:20

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Reply-To: <paul DOT batt AT baublatt DOT ch>
From: "Paul Batt" <redaktion AT pbatt DOT ch>
To: <cygwin AT cygwin DOT com>
Subject: What does a Script do to Windows text files?
Date: Fri, 31 Dec 2004 01:02:55 +0100
Organization: Baublatt
MIME-Version: 1.0
Message-ID: <EXSMTP01DreBBsQwY6Y000001fe@mail.messaging.ch>
X-OriginalArrivalTime: 31 Dec 2004 00:02:55.0705 (UTC) FILETIME=[14733490:01C4EECC]
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id iBV03I1c026559

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
do
   awk '{if (NR==7) {print "Datei: " FILENAME};
         print}' "$F" > tmp.txt
   mv tmp.txt "$F"
done

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,
however.  

-- 
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 DOT batt AT baublatt DOT 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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019