OK. It’s been a long time since I did any of this text manipulation stuff, and then only on my last OS, OS/2, quite a few years ago
I have a couple of thousand text files all in the same name format user@emailaddress.dat. Inside each file I need the first two items and the last item on the first line which is delimited by “|”. I want to copy these two items and the last item for all files into one file, delimited by a tab, each files data to be on a new line.
OK. I got the first piece of content into a datafile, by doing it manually. I now need to add the 2nd and last piece of data to the file. Or if it’s better to start over, I will
On 2012-02-08 02:36, stubble wrote:
>
> OK. It’s been a long time since I did any of this text manipulation
> stuff, and then only on my last OS, OS/2, quite a few years ago
With a combination of ‘head’ and ‘tail’ you can get any line of the file.
Then with ‘cut’ you can extract fields.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
Thanks Knurpht. A variation on that did the trick. The spread sheet took some editing for more than one word answers (which went into separate cells… a problem with the formatting of the file from the previous program), but it did the trick and I was able to import my users into another program’s database. It went quite well. Thank you and to all others who replied.