mps-grupkontrol

This commit is contained in:
milisbir 2018-07-20 23:42:30 +03:00
parent 8b8059656c
commit f95d8b0233
1 changed files with 4 additions and 3 deletions

View File

@ -1627,7 +1627,8 @@ grup_kontrol() {
local _talimat _grup
[ -z $1 ] && exit 1
_talimat="$1"
_grup=$(grep -ri "Grup:" ${_talimat} | cut -d':' -f2 | sed 's/^ *//;s/ *$//' | cut -d' ' -f1)
_grup=$(LC_ALL=tr_TR.utf-8 grep -ri "Grup:" ${_talimat} | cut -d':' -f2 | sed 's/^ *//;s/ *$//' | cut -d' ' -f1)
echo "( $_grup ) içermektedir!"
if [ -z "${_grup}" ];then
_grup="bos"
grupad_kontrol $_grup ${_talimat}
@ -1645,7 +1646,7 @@ grupad_kontrol() {
_talimat="$2"
if [ -f ${GRUP_DOSYA} ];then
for grup in `cat ${GRUP_DOSYA}`;do
[ $_grup = $grup ] && _var=1
[ "x${_grup}x" = "x${grup}x" ] && _var=1
done
if [ $_var -eq 0 ];then
cat -n ${GRUP_DOSYA}
@ -1653,7 +1654,7 @@ grupad_kontrol() {
if [ $_grup = "bos" ];then
echo "Talimat grup bilgisi içermemektedir!"
else
echo "Talimat geçersiz grup bilgisi içermektedir!"
echo "Talimat geçersiz grup bilgisi( $_grup ) içermektedir!"
fi
echo "Yukarıdaki grup numaralarından birini seçiniz!";read -p "No:" _no
[ $_no -lt 1 ] && grupad_kontrol $_grup ${_talimat}