25 lines
408 B
Bash
25 lines
408 B
Bash
|
###
|
||
|
# Utilities
|
||
|
###
|
||
|
|
||
|
ll() {
|
||
|
command ls -AlF "$@"
|
||
|
}
|
||
|
|
||
|
ssh() {
|
||
|
TERM=xterm-256color command ssh "$@"
|
||
|
}
|
||
|
|
||
|
awk-find() {
|
||
|
if (( $# > 1 )); then
|
||
|
local find_in=${TO_FIND:-.} file pattern=$1 to_find=( )
|
||
|
|
||
|
for file in "${@:2}"; do
|
||
|
to_find+=(-name "$file" -o)
|
||
|
done
|
||
|
|
||
|
find "$find_in" -not -name . "(" "${to_find[@]::${#to_find[@]} - 1}" ")" -print0 |
|
||
|
awk -F / -v RS="\0" "$pattern"
|
||
|
fi
|
||
|
}
|