Re: Contacts printing



Rodolfo Medina <rodolfo.medina@xxxxxxxxx> writes:

I wish a way to print the
Contacts (about 300) that I have stored in a directory, one per file.


"Douglas A. Tutty" <dtutty@xxxxxxxxxxxxx> 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?



Hasler <jhasler@xxxxxxxxxx> writes:

What are the filenames?

They're numbers: 115, 116,... 392,...



"Douglas A. Tutty" <dtutty@xxxxxxxxxxxxx> writes:

Well its possible. The how is back to your choice of language. If you
want to use grep, you could just rgrep them or something.

Grep is to search for string within files, how can it do sorting jobs?


If you just want a list printed, assuming that there is at least a blank
line at the top or bottom of every file, you could just cat them
together then print the file. It won't be sorted unless the file names
are sorted already.


The file names are not sorted.


So, assume that anything is possible:

1. What do you want to do?


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.


2. In what language do you want to do it?


This is the same for me.

Thanks indeed for your help
Rodolfo


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: Contacts printing
    ... parse the files and format it to your liking then just print it out. ... I want to cat all those file into one file and then sort the above entries, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • RE: Awk scripting Question
    ... For f in `cat /tmp/users` ... > Subject: Awk scripting Question ... > It looks like the script is failing at the echo `grep '/$user:' ... > unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe ...
    (RedHat)
  • shutdown
    ... To unsubscribe, ...
    (freebsd-stable)
  • Re: bash scripts: how to determine directory of sourced file
    ... ] set | grep BASH_ARG ... should be sufficient to locate the sourced file. ... michael@ratty:/tmp$ cat> test.sh ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: bash: any way to reuse the last output?
    ... > You could always save the output to a file and then use cat ... locate |tee filename.dat ... grep "stuff" filename.dat ... To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list ...
    (Fedora)