Hello folks,
I have a data file in which each line has 54 numbers, and every 3 numbers are bracketed. So totally 18 pairs of brackets in each line.
A typical line is like:
{29.187000274658203 -16.148000717163086 -0.9380000233650208} {30.63800048828125 -15.977999687194824 -0.3569999933242798} {31.273000717163086 -14.661999702453613 -0.8920000195503235} {31.34600067138672 -14.612000465393066 -2.4649999141693115} {31.944000244140625 -13.251999855041504 -2.937999963760376} {32.167999267578125 -12.991999626159668 -4.390999794006348} {30.98200035095215 -13.326000213623047 -5.288000106811523} {30.961999893188477 -12.444000244140625 -6.568999767303467} {29.742000579833984 -12.843999862670898 -7.388999938964844} {29.194000244140625 -12.116999626159668 -8.392999649047852} {27.920000076293945 -12.36400032043457 -9.166000366210938} {28.06599998474121 -12.16100025177002 -10.722000122070313} {28.545000076293945 -10.763999938964844 -11.09000015258789} {28.238000869750977 -10.347000122070313 -12.569000244140625} {28.989999771118164 -11.258999824523926 -13.631999969482422} {28.481000900268555 -11.187999725341797 -15.022000312805176} {29.47800064086914 -10.324999809265137 -15.859000205993652} {29.010000228881836 -9.907999992370605 -17.30699920654297}
When reading it into Matlab, I want to get a clean file without brackets.
Is there a way to process the date file using a shell script?
Your help will be highly appreciated.
Todd
---------- Post updated at 02:49 AM ---------- Previous update was at 02:35 AM ----------
Search this board and seems this code works
sed 's/[!@#\$%^&*()]//g' filename > newfile