On Mon, 28 Apr 2003 17:17:55 +0200
Anders Johansson
On Monday 28 April 2003 16:51, Jerry Feldman wrote:
In my case, I put all the queue entries into a linked list and matched them to some keywords entered by the user then built another command for postsuper. You can do a similar thing with postsuper by calling it once with input from standard input: /* Code frag */ FILE *opipe; if ((opipe = popen("postsuper -d -", "w")) == NULL) { fprintf(stderr, "Popen error:%s\n", strerror(errno)); exit(-1); /* foreach queue id to be deleted */ printf("%s", ll->qid);
typo?
fprintf(opipe, "%s", ll-qid); Yes, I stand corrected. In any case it works fine. IMHO, I think that the most useful thing that Ken Thompson put into Unix was pipes.
--
Jerry Feldman