I have a command like python abc.py -p 'File Path' -c 'File path'.
Asked
Active
Viewed 92 times
1 Answers
3
I assume what you wanted to ask is how to use command line arguments in conjunction with an alias (which you cannot). Try to define a function instead:
Using zsh:
% func abc() { echo python abc.py -p "$1" -c "$2" } % abc def ghi python abc.py -p def -c ghiUsing bash:
$ function abc { echo python abc.py -p "$1" -c "$2"; } $ abc def ghi python abc.py -p def -c ghiYou might also want to have a look at alias vs. function in bash scripts.
Markus Ueberall
- 571