Hi folks, hope your all well.
I'm piping the output from gnuplot and want to log each line of output separatly. This is what i have so far
Code:
gnuplot $CMD 2>&1 | while read line; do
log $line
done
Looks simple right? I'm assuming that read parses newlines
Problem is the log is like this
Code:
${log prefix stuff}: FIRST LINE OF ERROR
NEXT LINE OF ERROR
NEXT LINE OF ERROR
...
etc etc and so forth.
Anyone have any genius idea I completely missed?
Regards
G
:Edit
Should have said that the logging function works fine in about 200 other places im using it. Throw it a string and it records it and prints it the way its supposed to.