I was trying to install docker in Ubuntu, and following the instructions I have come across a very strange sed
command which I do not understand (this seems to be used to set-up bash autocompletion for docker):
sudo sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/docker.io
What is that command doing? The -i
command means in-place editing, but what does the $acomplete -F _docker docker
mean? The $
is matching the last line, but what is it doing? I do not even recognize any sed command there! For example, a substitution command would look like:
$s/in/out/
Could somebody explain that expression for me?