Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
791 views
in Technique[技术] by (71.8m points)

linux - TERM environment variable not set

I have a file.sh with this, when run show : TERM environment variable not set.

smbmount //172.16.44.9/APPS/Interfas/HERRAM/sc5 /mnt/siscont5 -o 
iocharset=utf8,username=backup,password=backup2011,r

if [ -f /mnt/siscont5/HER.TXT ]; then
    echo "No puedo actualizar ahora"
    umount /mnt/siscont5
else 
    if [ ! -f /home/emni/siscont5/S5.TXT ]; then
        echo "Puedo actualizar... "
        touch /home/emni/siscont5/HER.TXT
        touch /mnt/siscont5/SC5.TXT
        mv -f /home/emni/siscont5/CCORPOSD.DBF /mnt/siscont5
        mv -f /home/emni/siscont5/CCTRASD.DBF /mnt/siscont5
        rm /mnt/siscont5/SC5.TXT
        rm /home/emni/siscont5/HER.TXT
        echo "La actualizacion ha sido realizada..."
    else
        echo "No puedo actualizar ahora: Interfaz exportando..."
    fi
fi
umount /mnt/siscont5
echo "/mnt/siscont5 desmontada..."
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can see if it's really not set. Run the command set | grep TERM.

If not, you can set it like that: export TERM=xterm


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...