Skip to content

Instantly share code, notes, and snippets.

@seddi
Created November 8, 2010 21:12
Show Gist options
  • Save seddi/668282 to your computer and use it in GitHub Desktop.
Save seddi/668282 to your computer and use it in GitHub Desktop.
#!/bin/sh
yoket="/dev/null"
# /home dizinini kullanarak kayitli kullanici arama
echo -n "kullanici adi giriniz : "; read name
ls $( readlink -f $HOME/.. ) >home.txt
if grep $name home.txt 2>$yoket 1>2 ; then
echo "$name isminde kullanici bulundu "
else
echo "$name isminde kullanici bulunamadi"
fi
# /etc/passwd dosyasini kullanarak kayitli kullanici arama
echo -n "kullanici adi giriniz : "; read name
if grep $name /etc/passwd 2>$yoket 1>2; then
echo "$name adinda kullanici bulundu :) "
else
echo "$name adinda kullanici bulunamadi :("
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment