Created
November 8, 2010 21:12
-
-
Save seddi/668282 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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