echo -e "#!/bin/bash # echo 'This is my script'" > my-script sudo install my-script /usr/local/bin rm my-script