perl -pe 's|\d+,(\S+)$|join "\t", (split /:/, $1)[4,5]|e' data
19 54240283 . T C . . . 18 189
1 103020 . A C . . . 2 2
2 8797402 . G A . . . 3 0
В псевдониме нельзя использовать аргументы. (Вы можете добавлять элементы после него, но это только усложняет ситуацию. )Вот что о них говорится на справочной странице(man bash
):
The first word of each simple command, if unquoted, is checked to see if it has an alias. If so, that word is replaced by the text of the alias. [...]
There is no mechanism for using arguments in the replacement text. If arguments are needed, a shell function should be used. [...]
For almost every purpose, aliases are superseded by shell functions.
Итак, вместо псевдонима следует использовать функцию.
rp() { rename "s{$1}{}" *; } # No "{}" characters in the substitution
Использование
rp 'the.' # Quotes optional but recommended. Remember. represents any character