0

I'm trying to make an alias for my shell script which is saved in ~/Dokumente/music.sh

Therefore, I added following line to ~/.bash_aliases:

alias music='.//home/robin/Dokumente/music.sh'

After saving, I executed source ~/.bash_aliases.

I think the alias itself is working fine, but ./ doesn't find the file. Why? I've tried multiple things (e.g. ~/Dokumente/music.sh) but nothing works.

I can execute the script when I type ./music.sh within the containing folder. That shouldn't be the point…

I want the script being executable from any direction with this user.

Any help would be appreciated!

2
  • 1
    ./ generally stands for current directory, why do you want to use it in your alias? ./home/... basically refers to a directory called home within your current directory, not /home – Grzegorz Oledzki Sep 14 '14 at 13:19
  • 1
    ~/Dokumente/music.sh should worked (try after opening new terminal or new tab) – Pandya Sep 14 '14 at 13:37
4

Try:

alias music='/home/robin/Dokumente/music.sh'

the ./ part usually denotes current directory, so a relative path.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.