I'm trying to make an alias to a binary to ensure I'm using the latest version. Though I'm unable to propagate arguments
I'd to call it like so: script --arg first-argument
# One-liner splitted into several lines in order to make it more intelligible # I consider using `| sort -V | tail -1` to sort, I'm new to `awk` and realize how weak this might be alias script="ls -alh /path/to/ruby/gems/ | \ grep -E script-[0-9].[0-9].[0-9]+ | \ awk 'END{split(\$9,a,\"-\"); print \"/path/to/ruby/gems/script-\"a[2]\"/bin/script\"}' | \ bash $@" To simplify, the problem would be the same with the following:
alias script="echo '/path/to/some/script' | bash <arguments>" Hadn't any success with $@, $*, "$@", "$*" or xargs, could you help me ?