You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
378 B
23 lines
378 B
#!/bin/bash
|
|
|
|
while [ $# -ne 0 ]; do
|
|
case "$1" in
|
|
'-user')
|
|
l=$2
|
|
shift 2
|
|
if [ "$2" = 0 ]; then
|
|
echo "manque le nom d'utilisateur" >&2
|
|
exit 1
|
|
fi
|
|
echo $(ps -U)
|
|
echo $(find -name "$l")
|
|
if [ $? -ne 0 ] ; then
|
|
echo "aucun utilisateur avec ce nom n'a été trouvé !!"
|
|
fi
|
|
;;
|
|
*)
|
|
echo "Argument $1 inconnu" >&2 && exit 2
|
|
;;
|
|
esac
|
|
done
|