Search code examples
linuxbashawksedaudacity

Remove duplicate string in multiple lines


Okay, so I have a big ol' beat finder label output from Audacity that looks like this:

25.651000            25.651000
25.666000            25.666000
25.685000            25.685000
25.718000            25.718000
25.737000            25.737000
26.244000            26.244000
27.050425            27.052000
27.853000            27.853000
27.867000            27.867000
28.674000            28.674000

However, as you can see Audacity decided to duplicate the first column twice. However, I don't want that second column. Is there anyway to delete that second column leaving me with something like this?

25.651000
25.666000
25.685000
25.718000
25.737000
26.244000
27.050425
27.853000
27.867000
28.674000

There are about 186 lines.


Solution

  • This should do it for you;

    cut -f 1 -d ' ' MyFile.txt

    Results in:

    25.651000
    25.666000
    25.685000
    25.718000
    25.737000
    26.244000
    27.050425
    27.853000
    27.867000
    28.674000