command line – how to copy .bashrc file for several users? on solaris

i used this script

X='$( cat etc/passwd | cut -f1 -d: )' #All-users
For X in /export/home/*/.bashrc ; do
echo "$HOME/.profile'" >> $X
$X 2>/dev/null
source $X
exit 0

but i’m faced with error and it is not print what i want
./ line 3: syntax error near unexpected token do' ./ line 3: For X in /export/home/*/.bashrc ; do ‘

The main purpose i used this script to print $HOME/.profile on .bashrc file for all users at once using script on root user. i try one script it work only for one user
echo “$HOME/.profile” >> /export/home/test/.bashrc