i set permission of myshell.sh to 777.
tofile.txt to 777.
i changed lsof->/usr/sbin/lsof too
i run ./ myshell.sh only.(below code) and its ok.the data show in /tmp/tofile.txt
PHP Code:
#!/bin/bash
lsof -i -n -P |sort >/tmp/tofile.txt
and i run perl script
PHP Code:
#/usr/bin/perl
print "Content-type: text/html\n\n";
system("sh myshell.sh");
with myshell.sh
PHP Code:
#!/bin/bash
/usr/sbin/lsof >/tmp/tofile.txt
Its ok too.
But when i try to add 1 or more options( -i -n -P) or
PHP Code:
#!/bin/bash
/usr/sbin/lsof |sort >/tmp/tofile.txt
it did not do anything.
Nothing in /tmp/tofile.txt