Possible Duplicate:
How to pass parameters to an alias?
I'm wondering if it is possible to define an alias with parameters.
For example, when I have to compile a tex file I execute pdflatex and then I have to open the pdf:
$ pdlatex Main.tex
$ Open Main.pdf
Is there a way for defining an alias like this:
alias buildPdf="pdflatex x.tex && Open x.pdf"
Where x is a parameter?
$1
instead of%1
, perhaps? – Shawn Chin Dec 23 '11 at 13:50.bashrc
? – Dec 23 '11 at 13:52.profile
, depending on which file is sourced when you start your shell. – Dec 23 '11 at 13:53-bash: /Users/luca/.profile: line 35: syntax error: unexpected end of file
– Dec 23 '11 at 13:54