i got a little problem writing a shell-script to parse log-files and write them into a mysql DB.
--
#extract sizes
grep -i '^HTTP' /home/logs/*.log | cut -f10 -d" " >/home/logs/size
--
Thats the problem: -f10 -d" " marks out the last entry in each line where the bytesize is stored. but when i look at /home/logs/size i get:
1234^M
5^M
..
so i get in trouble when later in another script i try to assign those lines to an integer var.
Does anybody know how to cut off the ^M or another solution?
Tnx in advance,
d-fens