Commit 929d4523 authored by nimrod's avatar nimrod
Browse files

extensions shell function.

parent 85a5b9ee
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -176,6 +176,14 @@ ddg () {
    w3m "https://lite.duckduckgo.com/lite/?q=$(echo "$@" | urlencode)"
}

extension () {
    [ "$#" -gt 0 ] || return 0
    for filename in "$@"
    do
        echo "${filename##*.}"
    done
}

genpass () {
    bytes="${1:-32}"
    head --bytes="$bytes" /dev/urandom | base64 --wrap=0