Dealing with environment variables with ssh can be delicate. The
problem is that the substitutions are happening on your machine instead
of on the remote machine. In the specific case you gave, using double
quotes instead of single quotes will tell your shell to send the string
without performing substitution:
pssh -h nodes -l $USER -P 'export TODAY=$(date +"%F");export NODE_NAME=`hostname` ; cp /home/$NODE_NAME/grid /home/hadoop/grid'
In some other cases, getting everything to work can be even more
complex, but this should work for your situation.
--
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868