0

I am trying to have an alias to move binaries into a folder on my path. Currently I have:

alias addapp='sudo mv $1 /usr/local/bin'
MANICX100
  • 199
  • 2
    A bash alias does not accept a parameter. You will need to rewrite this as a function. It would also help in future posts to include any error messages you get in invoking your commands. – doneal24 May 25 '22 at 19:23
  • The most important fact about aliases in sh and such: an alias replaces text with text. If you imagine addapp turns into sudo mv $1 /usr/local/bin in whatever command line you wanted to use it then you will see why it didn't work as you expected. – Kamil Maciorowski May 25 '22 at 19:45

0 Answers0