1.要求:
执行脚本后显示当前主机名称、ip登陆当前主机的用户
hostname: xxxxx
ipaddresss: xxxxx
username: xxxxx
2)脚本内容
#!/bin/bash
echo "hostname: `hostname`"
echo "ipaddress: `ifconfig enp1s0 | awk '/inet\>/{print $2}'`"
echo "username: $USEER"
1.要求:
执行脚本后显示当前主机名称、ip登陆当前主机的用户
hostname: xxxxx
ipaddresss: xxxxx
username: xxxxx
2)脚本内容
#!/bin/bash
echo "hostname: `hostname`"
echo "ipaddress: `ifconfig enp1s0 | awk '/inet\>/{print $2}'`"
echo "username: $USEER"