[CSC 415] bash/grep/sed script

Andrew J. Pounds pounds_aj at mercer.edu
Mon Feb 6 12:05:37 EST 2023


So assuming your file with the vertices from Blender is called verices.stl

cat vertices.stl | grep vertex >temp1

sed "s/vertex //g" temp1 >temp2

sed "s/ /,/g" temp2 >temp3

sed "s/$/,/g" temp3 >temp4

then temp4 would contain the cleaned up vertices that you could stick in 
an array




-- 
*Andrew J. Pounds, Ph.D.*
/Professor of Chemistry and Computer Science/
/Director of the Computational Science Program/
/Mercer University, Macon, GA, 31207 (478) 301-5627 /
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc415/attachments/20230206/e86a886c/attachment.html>


More information about the csc415 mailing list