View Single Post

  #4 (permalink)  
Old 11-21-2007, 03:46 PM
chebbab chebbab is offline
Junior Member
User
 
Join Date: Nov 2007
My distro: fedora
Posts: 4
Rep Power: 0
chebbab is on a distinguished road
Default

Hi my latest question I managed to find the solution

tail -1 file | cut -d= -f3 -f6 -f8 -f10 -f12 >> file.out

touch file.tmp
(for text in `cat file.out`;
do
echo -e -n " \b$text " >> file.tmp
done

cat file.tmp | tr [:blank:] , >> file.csv

Now this works and I got all my needed data into a comma seperated file.
I also tried the above received code from you Monk but I don't understand what it realy does, where does my .CSV file fits?

these file need to be dumped into a mysql db in a table..

thanks for your help
Reply With Quote