I am following the instructions on this site for Grails installation, but am not able to write to /etc/profile like it instructs.
sudo echo ‘JAVA_HOME=/usr/lib/jvm/java-6-sun’ >> /etc/profile
Instead, I get this error:
bash: /etc/profile: Permission denied
Why am I not able to write to the file even using sudo?