March 28, 2023, 09:13:59 AM

News : Linux Help Community Forum..

Author Topic: Converting log file to csv file  (Read 9748 times)

Offline ana45

  • New Member
  • Posts: 3
Converting log file to csv file
« on: December 10, 2009, 04:48:09 AM »

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.

« Last Edit: December 10, 2009, 08:54:14 AM by ana45 »

Offline kaushalpatel1982

  • LST CareTaker
  • Linux Learner
  • *****
  • Posts: 87
Re: Converting log file to csv file
« Reply #1 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.