I'm setting up a Mythtv box at home using Debian Wheezy and I wanted the Nvidia drivers for VDPAU. In the past, I have installed Nvidia drivers manually downloaded from the Nvidia web site. This time, I found the following line of code from the Debian wiki:
aptitude -r install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-kernel-dkms
To my surprise, this worked in one step. Upon reboot, the Nouveau driver was blacklisted and the Nvidia driver was installed and working.
I'm posting this with the hope that I can learn something, because I don't understand what the code above is doing. It seems I will never progress from being a newbie. I understand that the command is to install linux-headers for the currently installed kernel. What I don't understand is what the sed command is doing? Can someone break it down?