Re: Put ID at beginning of data lines
"Eliana" <[email protected]>
| Newsgroups | gmane.editors.sed.user |
|---|---|
| Message-ID | <TkcMail.1337289854.21799.0@zaurus> |
> Hello,
> another way (without using the hold
> space).
> cat x.sed
> N
> /\n\"/!{
> s/^\(.*\)\n/\n\1/;
> D
> }
> P;
> D
> thanks
> nadler
Thank you, sorry for the delay. Unfortunately, my sed does not recognize the \n as a newline, so this will not work for me. I did try it, and it did not produce the desired results at all. But I was able to use the suggestions of others to help me process my data and pipe the data back and forth between sed and tr, to produce the desired results, and I am quite happy.
At some point before the year is over, I may have a more up to date operating system and be able to try this on that with a newer sed, but for now, I have to be content with doing some fiddling around outside of sed to produce the final desired results.
I only asked the list for help with the attachment of IDs to data lines, as I could handle the other code myself, switching variables around and recoding and standardizing some of the content. I have put all of what I need into a shell script that automates an awkward set of multiple calls using awk, sed, and tr, but gives a file that now has exactly what I need.
Thanks again,
Eliana