alias/function with command line arguments
Posted
by
Agzam
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Agzam
Published on 2014-06-03T19:58:23Z
Indexed on
2014/06/03
21:40 UTC
Read the original article
Hit count: 211
I'm tired of typing manage.py startserver 10.211.55.4:4000
, so decided to make an alias for that. Only thing is: the port sometime changes. So I did this in bash profile:
function runserver() {
python manage.py runserver 10.211.55.4:$1
}
But then when I call it: runserver 3000
, it starts it, but immediately stops saying:
"Error: That IP address can't be assigned-to". However if I type the same thing right into command line it works with no complains.
© Ask Ubuntu or respective owner