Mavlink data to text or CSV file

How can I get mavlink data from radio to text or csv file in real time.

Can i run a script ,for mavlink data from radio telemetry to text or csv.?

Just download Qgroundcontrol, it has a built in widget for the CSV log.
If you need to run also Mission planner or whatever, just download also MAVProxy and duplicate the MAVLink signal from the COM port.
Best regards