Linux Forums - Linux Help,Advice & support community:LinuxSolved.com

Linux in General => Linux Tutorials & How To's => Topic started by: ana45 on December 10, 2009, 04:48:09 AM

Title: Converting log file to csv file
Post by: ana45 on December 10, 2009, 04:48:09 AM
Hi,

I've created a cron job to pull files from a remote server to my local server. It generates log file for the crontab activity. The log file will contain the name of the file, date and time.

Now what I need to do is convert the log file into CSV format so that I can open it in Excel.

Pls help me in creating a script or any other method for the conversion.

Tqs.
Title: Re: Converting log file to csv file
Post by: kaushalpatel1982 on December 10, 2009, 01:20:09 PM
When you open such file that have different separator then comma (,) it will ask you about choose another separator.

When you write any log file just add comma to separate the filename, date, and time. This will automatically open with excel without munch efforts.