I have a script that takes a command and executes it on a remote host. It works great, for example:
$ rexec "ant build_all"
will execute the command "ant build_all" on the remote system (passing it through SSH, etc.).
Since I'm lazy, I want to set up an alias for this command (and ultimately a few others), for example, that I can just call
$ rant build_all
and bash whether it will automatically call
$ rexec "ant build_all"
I tried to do this with an alias, but if I define
alias rant=rexec ant
then any arguments passed to "rant" will simply be added to the end, for example:
$ rant build_all -Dtarget=Win32
(interpreted as:)
$ rexec "ant" build_all -Dtarget=Win32
This fails because rexec really only accepts one argument and ignores the others.
, bash wrapper script, , bash - , , - perl- (, qw//) .