IIRC you need the command 'open' to run some commands on MacOSX (if
they are not in the usual /usr/bin directory, or similar).
for using pdsend on MacOS I had to this:
echo "YOUR_DATA";|/Applications/Pd-extended.app/Contents/Resources/bin/pdsend
PORT