real time data log from serial monitor in arduino

  • hi! i have connected m5 gps to m5 stack to get the real time positions of my robot.
    my program is successfully running giving me position data in serial monitor. i want to save the data in csv format from the serial monitor in real time and feed it to my robot.
    Anyone knows a command/program that i can include in my program to save the file automatically?