I'm moving a legacy party script which runs in the www server. I've discovered an problem that i'm unable to explain.

When went with the webserver (like a CGI incorporated script), the next instructions:

set -e -u
echo "BP: Statistics generation 1" >/dev/fd/2
echo "BP: one: $1, two: $2" >/dev/fd/2

more ../download/interactions.$1.$2 | grep -v "#" | awk '($2!~/_R/){print $2}' | sort -k 1 | uniq > rna.names.txt
more ../download/interactions.$1.$2 | grep -v "#" | awk '($1!~/_R/){print $1}' | sort -k 1 | uniq > protein.names.txt

The protein.names.txt appears like:


The center may be the expected output but the foremost and the final line not. Neither seem to be included in the interactions.x.y file, which only consists of a title at first explaining the posts and data. Test grep shows verifies the information is not present.

The strangest factor is when I log to the same machine and run the script from terminal (even su-ing because the www-data), the output is only the middle line, as it ought to be.

I've attempted to export env and hang from party before the stated command and re-import them before you run the script attempting to recreate what's happening around the server, without any avail.

The script is not invoked directly, there's a CGI-incorporated perl-script performing a method call to operate the script via party.

What's the supply of that output? How do i a minimum of reproduce it?