alias , xargs
Alias – from
http://unix.stackexchange.com/questions/1496/why-doesnt-my-bash-script-recognize-aliases
Aliases are not expanded when the shell is not interactive, unless the expand_aliases shell option is set using shopt (see the description of shopt under SHELL BUILTIN COMMANDS below).
So put a
shopt -s expand_aliases
in your script.
Make sure to source your aliases file after setting this in your script.
shopt -s expand_aliases source ~/.bash_aliases
XARGS – from
http://stackoverflow.com/questions/937716/how-do-you-send-the-output-of-ls-to-mv
$ ls | xargs -Ifile mv file file.txt $ ls a.txt b.txt c.txt x.txt y.txt z.txt
Discussion ¬