in reply to Re: not waiting for external command to complete before getting the output
in thread not waiting for external command to complete before getting the output

Thanks guys for the help.

I have tried all these solutions. None of them work. They all print the information I am wanting at the end of cutting the CD. I looked through the cdrecord code, and Jorg places a \r at the beginning of each line of output denoting how much of the cd has been cut. I tried removing those in perl, but to no avail either.
What's really strange is if I redirect the output to a file, and then tail the file simultaneously, I get the information I am after. When I look at the file with VI, I see the following type of output:

^MTrack 01 0 of 47MB^MTrack 01 1 of 47MB^MTrack 01 2 of 47MB^M.....etc....

This has the effect that each line indicating the percent of the track cut is over-written by the next line, creating that "nice" feeling of interactivity. I just find it's making my life hell.

Also not sure that I fully understand how it can well be appending to a file on redirecting output from cdrecord, but not giving me the output when I pop the same in a perl script.
Cheerio
Hambo
  • Comment on Re: Re: not waiting for external command to complete before getting the output

Replies are listed 'Best First'.
Re: Re: Re: not waiting for external command to complete before getting the output
by zentara (Cardinal) on Apr 28, 2004 at 16:12 UTC
    There is some information on dealing with these situations in "perldoc -q filehandle", about using sysread and ioctl. I'll try to get an example that works with cdrecord and post it later.

    I'm not really a human, but I play one on earth. flash japh