Re: adding leading characters to stdout
From: William Park (opengeometry_at_yahoo.ca)
Date: 04/29/04
- Next message: Barry Margolin: "Re: Sort the file"
- Previous message: SeungSeop, Park: "adding leading characters to stdout"
- In reply to: SeungSeop, Park: "adding leading characters to stdout"
- Next in thread: Barry Margolin: "Re: adding leading characters to stdout"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Apr 2004 05:31:34 GMT
SeungSeop, Park <sspark@hi.snu.ac.kr> wrote:
> Hi.
> I want to organize the output of a program such that sub-program's
> outputs start with some leading charactors :
> -------------------------------------
> :
> normal program output comes here
> :
> :
> >
> > sub-program outputs start with ' >' characters
> >
> --------------------------------------
>
> To do that, i made a shell scripts :
> -------------------------
> # /bin/sh
> ...
> noraml_prog
> ...
> sub_prog 2>&1 | sed -e 's/^/ >/'
> ...
> ---------------------------
> This works. But, because a pipe buffers the output of a program, there
> are long delays before I can see any output.
>
> Is there any idea??
'read' does not buffer. But, it is slow.
-- William Park, Open Geometry Consulting, <opengeometry@yahoo.ca> Linux solution/training/migration, Thin-client
- Next message: Barry Margolin: "Re: Sort the file"
- Previous message: SeungSeop, Park: "adding leading characters to stdout"
- In reply to: SeungSeop, Park: "adding leading characters to stdout"
- Next in thread: Barry Margolin: "Re: adding leading characters to stdout"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|