Unix Program for data and print

Hi
Is there any UNIX program (or Mac OSX) that works with delimitted data files, manipulates the data into a letter / layout form and can then send multiple personalised forms to multiple printers? If this is not the right forum, can anyone point me in the right direction?
Thanks
Mike Taylor

You could write a script to do this...
It's hard to say for sure, though, with so little information.

The way the problem was stated, it sounded like 'mailmerge' - this is a part of most word processors -??

Is this an example:

@list = ('atle', 'per', 'geir');

@letters = ('intro', 'invoice', 'request');

And then, you exmine the status of each element in the list, determine whether they should get an 'intro', 'invoice' etc. (or 'nothing' !!!) and the contents of each letter is then filled in with 'name' 'address' etc in the style of

Dear $firstname if it is an informal letter

Dear $title $lastname if it is a request for money, etc.

This is something StarOffice is very good at.
But I think other 'office' applications like koffice are getting up to the task as well?

Atle

Hmmm ... I am not sure what he is asking for ? I am curious, miketaylor can you be kindly more specific ? I dont know what you mean by a delimited data file ? Example ? What would the delimiter signify ?

I think we lost miketaylor here, this post has been up for a while.
When I responded to it, I assumed a delimited data file to be an ASCII file where the 'delimiter' signified end-of-field, and where newline signified end-of-record, these things are very common in the DOS world, but not unseen in our world, either :slight_smile:
Comma-delimited qouted strings (typical export file)

"Hacker","A.Genius","Main St.","Unic City","41"
"Hacker","J. Random","Back St. 2","Dosburg","69"
"Hacker","N.A","","Weirdlayout"

Here is a colon-delimited data file

nobody:x:60001:60001:Nobody:/:
fbsdd00d:x:500:500:Admin:/home/fbsdd00d:/bin/sh

So, the program would typically read one line at a time, filling in a struct each time, and calling some program.

This can also be used for very evil things, like
spamming, but that was not what the OP wanted to do, I just show it to show off my newly aquired Perl-newbie status and possible faulty understanding or the problem.

#!/usr/bin/perl
$FIL = "/etc/passwd"
open FIL or die "Try that again and you die 4 real";
# Write a nice letter to each member
# of mailing list
while(<FIL>) {
	@Line = colon-delimited-list
	printf("Dear %s!\n", @Line[4]);
	printf("You were referred to me by your /etc/passwd file ...");
	...
}
close(FIL);

Atle

added code tags for readability --oombera

yeah u can do wht u want using shell programming implementing cut or perl would be a much better option to use in solving these things...
hope u would be doing better now by having so many feedbacks