NOAA-PMEL / Ferret

The Ferret program from NOAA/PMEL
https://ferret.pmel.noaa.gov/Ferret/
The Unlicense
55 stars 20 forks source link

SPAWN removes last character of the output; should check first to see if its a NEWLNE #468

Open karlmsmith opened 7 years ago

karlmsmith commented 7 years ago

Reported by @AnsleyManke on 14 Oct 2004 19:10 UTC Example:

let pid = {spawn:"perl -e 'print getppid,0'"}

The trailing 0 is just an arbitrary character to prevent the last digit of the PID from getting chomped by Ferret. (It seems Ferret expects the shell output to contain a trailing newline, so it eats the last character. I can't think of any way to tack a newline onto the end of the perl output here, because Ferret chokes on any quotes, backslashes, or semicolons inside this spawn construct.)

Migrated-From: http://dunkel.pmel.noaa.gov/trac/ferret/ticket/1021

karlmsmith commented 7 years ago

Comment by @AnsleyManke on 14 Oct 2004 19:15 UTC See also bug 981, "can't get size of result of spawn operation"