I wanted to create a .bashrc function
that would simplify passing data to a write-protected file.
function pipe {
sudo bash -c "$1"
}
Unfortunately the command
pipe echo something > /etc/importantfile
still shows me that permission is denied. How should I fix it?