On Mon, Oct 29, 2007 at 03:47:01PM +0100, Rodolfo Medina wrote: > On Mon, Oct 29, 2007 at 01:12:06PM +0100, Rodolfo Medina wrote: > > >> >>> I wish a way to print the > >> >>> Contacts (about 300) that I have stored in a directory, one per file. > Douglas A. Tutty" <[EMAIL PROTECTED]> writes: > > >> >> I think you just need to write a script in your favorite language to > >> >> parse the files and format it to your liking then just print it out. > > Rodolfo: > > >> > Every file is like this: > >> > > >> > BEGIN:VCARD > >> > VERSION:2.1 > >> > N:;Oliver Hardy ;;; > >> > TEL;CELL:3391234567 > >> > TEL;VOICE;HOME:081123567 > >> > FN:Oliver Hardy > >> > END:VCARD > >> > > >> > , so the major problem would be sorting: how to sort whole items like > >> > that? > > "Douglas A. Tutty" <[EMAIL PROTECTED]> writes: > > >> > So, assume that anything is possible: > >> > > >> > 1. What do you want to do? > > Rodolfo: > > >> I want to cat all those file into one file and then sort the above > >> entries, I > >> don't know how. I also want to eliminate redundant symbols and words like > >> `BEGIN:VCARD', `END:VCARD', `N:;', `VERSION:2.1' etc. > > Douglas: > >> > 2. In what language do you want to do it? > Rodolfo: > >> This is the same for me. > Douglas: > > What I mean is, in which programming language(s) are you proficient? > None.
Then, as I see it, you have two choices: 1. Take the opportunity to learn Python. 2. Cat the files together from the command line. Easiest way is to put them all in one directory (with nothing else) and issue: $ cat * > contacts.txt You now have everything in one file. Then put it in an editor and start manual sorting. Doug. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]