So I've got a line that looks like this ish
And I want to replace the second
: with a tab character. I can reliably match the substring I want to replace with the following:
I want to replace that substring I have there. So I've tried doing some sed
$ echo somelongbullshit:888:morelongbullshitthatcanhaveanything | sed 's/:[0-9]*(:)/\1\t/g' sed: -e expression #1, char 19: invalid reference \1 on `s' command's RHS
But I get an error. I'm sure there's some syntax error I've got wrong but for the life of me I can find it.
I'm also open to better solutions (like awk).