Hello,
I'm rather new to the world of regular expressions and sed, though am excited by its possibilities. I have a particular task I'd like to achieve, and have googled the topic quite a bit. However, having found some codes that perform a task very similar to what I'd like to do, I can't for the life of me fathom how to adapt them. So I figured I'd try asking someone with a bit more experience.
Basically I have a dataset in a text file and I want to change the variable headings.
Currently they read:
p_1 p_2 p_3 ... p_19
and I'd like to change them to:
P[,1] P[,2] P[,3] ... P[,19]
Is this something that can be done using sed?
Thanks awfully!