shell script'te string kontrolü yapmak için;
alttip=`echo "${shttip:0:2}"`
if [[ $alttip == "MD" ]] ; then
echo "MD dosyasi"
else
wcho "farkli dosya"
fi
önemli not: string'in ilk elemanı 0 (sıfır) olarak başlar.
0:2 ; ilk iki karakteri alır.
Wednesday, May 20, 2009
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment