Commit 6575bb24 authored by Alban Bruder's avatar Alban Bruder

Added ssh login parameter to login utility script

parent 9121bd5a
......@@ -21,7 +21,7 @@ check_tools "ssh"
usage() {
echo "
usage:
$(basename "$0") searchname
$(basename "$0") [-l login_name] searchname
description:
get fullname based on login name
......@@ -38,6 +38,7 @@ examples:
#
FLAGS_HELP=$(usage)
export FLAGS_HELP
DEFINE_string 'login' $(whoami) 'login name' 'l'
FLAGS "$@" || exit 1 # Parse command line arguments.
eval set -- "${FLAGS_ARGV}"
......@@ -51,7 +52,7 @@ main() {
fi
logInfo "look for $1"
name="$1"
ssh webis.uni-weimar.de "getent passwd | grep -i \"$name\" | awk -F':' '{print \$1;}' | sort | uniq | xargs finger -s " 2>/dev/null
ssh webis.uni-weimar.de -l "${FLAGS_login}" "getent passwd | grep -i \"$name\" | awk -F':' '{print \$1;}' | sort | uniq | xargs finger -s " 2>/dev/null
}
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment