[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: strip ^M from list of files in for loop
- From: "Stephen L Arnold" <sarnold earthling net>
- To: redhat-list redhat com
- Subject: Re: strip ^M from list of files in for loop
- Date: Sun, 30 Jul 2000 11:55:38 -0700
On 30 Jul 00, at 10:55, Bret Hughes wrote:
> I have a script that reads file names (each on a different
> line) from a file, does some work and writes the record read
>
> in from the file and appends ": timestamp" to it.
>
> Later when I am trying to process the file (it is still
> going) with variable=$(tail -1 logfile) the embedded ^M is
> kicking my ass:
If I get your meaning, the CRs are in the files listed in the list
of filenames you're reading in? Er, what did I just say? If so,
then I would cat each file through tr and remove the CRs (^M) on
the fly, then pipe it wherever you want. Sounds good, anyway. 8-)
see 'man tr' for the delete option. Of course, you could also do a
global delete first with emacs...
Steve
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]