0

How can I execute a command shortcut inside a command? For example, I have: alias cdp='cd /home/username' inside ~/.bashrc and I want to execute: mv A cdp, where A is a folder. But it doesn't work?

João Paulo
  • 127
  • 7
  • 2
    You cannot use an alias as a parameter to a command. In your example, it wouldn't be meaningful anyway... Try to use shell variables instead. – FedKad Jul 02 '21 at 11:11
  • 3
    Does this answer your question? [How to run an alias in a shell script?](https://askubuntu.com/questions/98782/how-to-run-an-alias-in-a-shell-script) – vanadium Jul 02 '21 at 12:12
  • Yes, it does, thank you so much ! – Hamza Ben Cheikh Jul 02 '21 at 13:14

0 Answers0