I was playing with the raspberry pi leds (How do I control the system LEDs using my software?)
Interestingly, on my pi the following command fails:
sudo echo heartbeat >/sys/class/leds/led0/trigger
The error is bash: /sys/class/leds/led0/trigger: Permission denied
However if I run the following pair of commands things work:
sudo -s
echo heartbeat >/sys/class/leds/led0/trigger
I would have thought the two ways of triggering the LEDs are the same. Are there some things sudo cannot do?