Fedora Linux shell 脚本编程?

Fedora Linux shell 脚本编程


蝴蝶刀刀
浏览 894回答 3
3回答

DIEA

思路:日期---date系统用户可以who命令查看当前登录的用户。发问候可以用write命令。以下为脚本:#! /bin/shdateecho "输入你要查找的用户"read USERNAMEwho | grep $USERNAMESTATUS=`echo $?`if [ $STATUS -eq 0 ]thenecho -n $USERNAMEecho " now is online"echo -n "输入您要发送的信息"echo ", 回车后以 ctrl + D 结束"write $USERNAMEelseecho -n $USERNAMEecho " 不存在。"fi看了overawe的回答,我的回答实在是拿不出手啊啊

阿晨1998

1、在/etc/sysconfig/static-routes里添加static-routes的写法是any net 192.168.0.0/16 gw 192.168.0.1any net 192.168.3.0/24 gw 192.168.3.254any net 10.250.228.128 netmask 255.255.255.192 gw 10.250.228.129检查vi /etc/init.d/network# Add non interface-specific static-routes.if [ -f /etc/sysconfig/static-routes ]; then2、在route-eth0里添加在/etc/sysconfig/network-scripts/route-eth0添加10.203.166.0/25 via 10.203.166.1 dev eth0
打开App,查看更多内容
随时随地看视频慕课网APP