diff --git a/etc/shell/bash/aliases b/etc/shell/bash/aliases index fee58bc..86e7e90 100755 --- a/etc/shell/bash/aliases +++ b/etc/shell/bash/aliases @@ -334,6 +334,23 @@ wcu() { cat "$1" | tr -cs A-Za-z\' '\n' | tr A-Z a-z | sort | uniq -c | sort -nr | nl } +#- Выполнение команды для всех файлов: apply cmd -1 -2 @ *.file +apply() { + CMD="" + + for argument in $@; { + if [ "$argument" != "@" ]; then + CMD+=" $argument"; shift + else + shift; break + fi + } + + for file in $@; { + eval "$CMD" "$file" + } +} + #}}} ########################################################################### #{{{ \033[00m\n\b------<Администрирование>\n ################################################################################