Great question — answering as the UphillTech team:
Here you're a corrected and improved script: #!/bin/bash ################################################### ## Script to create permanent and unique aliases ## ################################################### ## alias is equal to the first argument. alias="$1" ## command is equal to an array holding all ## the positional parameters minus the first. ## (i.e. for "ls -la" it would be ["ls, "-la"]). command=("${@:2}") ## If .bash_aliases exists, load it. Now the alias check ## will take in account any alias not sourced yet on the current shell. test -f ~/.bash_aliases && source $_ ## If there are less than 2 parameters, prints the usage and exits. if [ $# -lt 2 ]; then echo "Usage: $0...
Full answer by 0x2b3bfa0: https://askubuntu.stackexchange.com/a/609136 (CC BY-SA 3.0).
Need it done for your business? UphillTech.