Hi Padma,
There is probably a 'cleaner' way to do this, but this should work:
cat aseg.stats |grep -v '#'|sed 's/ \{1,\}/,/g'|sed 's/^,//'|sed 's/,$//' >
aseg.csv
-Paul
________________________________
From: [email protected]
<[email protected]> on behalf of priya padma
<[email protected]>
Sent: Wednesday, October 26, 2022 9:36 PM
To: Freesurfer support list <[email protected]>
Subject: [Freesurfer] conversion of .stats to .csv
External Email - Use Caution
Dear Team,
I would like to convert the .stats files that are being generated in the stats
folder as an output from recon-all to csv file or excel file. Is there any way
to convert .stats to .csv or .excel format? any help on this would be much
appreciated.
Thank you
--
Best Regards
Padma Priya
AI Developer
[https://secure-web.cisco.com/18su6ZmdWhUO0KseAqfEzoL3YRI-fCTh9PQy_6JGwGMgOqXSHX8kdUPJgrZrxDRlwiiDDpJ5m1wtmHphMELKMjvBwLSrN02yCt6GQHRKQ7hAGrIakc-YOGaZSD8TzBFC7PYQlRa7it6Kr0o-OsNcQ9tcYY_fxpvIrxuMsiqvC7q7twxfZZC6AWVn8j32Y1eIdqVVxpxFJoLRBOlXui7dD-F1g_ATGWoGGeFOTX8ucIo3P3AmFjlTI-Xy8mme20yXTdOKYHsJXXHeQH0vcUzg6i-mEJU4sx3OtUcxwvDSyBbaF09QR1fCDRR2xMwdkOpBapZ5T_P63AE46BsmI2EQ4kg/https%3A%2F%2Fci3.googleusercontent.com%2Fmail-sig%2FAIorK4ykzpaZA1H7XsTn4HQ_Fs4hZSuCC45PmDIn7lgswekFx_3X0rBTeiaRDv_vFG8eJpfL5ziZS8s]
PhenoMx, Inc.
[email protected]<mailto:[email protected]> | (+82)10-5405-2685
_______________________________________________
Freesurfer mailing list
[email protected]
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Mass General Brigham
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline
<https://www.massgeneralbrigham.org/complianceline> .
Please note that this e-mail is not secure (encrypted). If you do not wish to
continue communication over unencrypted e-mail, please notify the sender of
this message immediately. Continuing to send or respond to e-mail after
receiving this message means you understand and accept this risk and wish to
continue to communicate over unencrypted e-mail.