ICode9

精准搜索请尝试: 精确搜索
  • shell - 参数定义报错 command not found2022-09-12 13:05:06

    1.参数 wlanip = ""报错 command not found    2.解决 把 = 号的前后空格去掉即可, 赋值不允许有空格的 wlanip=""  

  • shell - 对txt文本的写入与读取2022-09-12 13:01:44

    1.目标 向文本写数据,从文本读数据 2.解决  写入文件 #记录本地ip到txt echo `ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"` > ./wlanip.txt 读取文件 #从txt读取ip wlanip="" while read line do wlanip=$wlanip$line done

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有