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:
instead of
/file/name/in/the/log/file:  07/30:10:12:50

the variable contains:
:  07/30:10:12:50the/file
looking at the logfile via less shows
/java/test/html/StreetHead.html^M: 07/30:10:12:50


I am using a

for f in $(cat file.names) do

      echo "$f: `date +%m/%d:%H:%M:%S`"
done

type of deal in the script and redirecting the output of the

script to the logfile.

I know I have seen something on this but searches and man
bash have been no help.

in perl I think I would use chomp but is there a way to do
this in sh?

Any help appreciated.

Bret


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to