- 博客(2)
- 收藏
- 关注
原创 利用shell脚本,获取网卡ip,并输入文件中
#!/bin/bashp=`pwd`file=$p/localip.txtif [ -f "$file" ];thenrm $filetouch $filefiif [[ -f /etc/debian_version ]]thenfor IP in $(ip a | grep inet | grep -v 127.0.0.1 | grep -v inet6 | awk '{print $2}' | cut -d "/" -f1)doecho
2018-07-11 18:18:25
5323
原创 cmake 执行 shell脚本
利用Cmake 来执行shell 脚本project(getlocal_ip) cmake_minimum_required(VERSION 2.6)add_custom_target(config ALL COMMAND bash getlocalip.sh )
2018-07-11 11:28:25
2985
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人