'sudo cat ~/.bashrc > /dev/lp0' does not work the way you intend it to. You need to do
echo hello | sudo tee /dev/lp0
'sudo cat ~/.bashrc > /dev/lp0' does not work the way you intend it to. You need to do
echo hello | sudo tee /dev/lp0