dotfiles/dotlib/post/util.sh

24 lines
462 B
Bash

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
}
clbin() {
tail -n +1 -- "$@" | curl -sSF 'clbin=<-' https://clbin.com
}