bash脚本未在文件上执行命令

问题描述

我正在使用ubuntu LTS 20.04,如果我在cli上执行了命令ipset add geoblock 7.7.7.7/24,则我的文本文件超过90.000行。我的测试文件test.sh可执行且可读(rx),看起来像这样:

 #!/bin/bash
 ipset add geoblock 23.21.22.22/24 
 ipset add geoblock 21.22.33.22/32 
 ipset  add geoblock 11.22.33.44/32
 ipset add ........ ..... ..... ..

但是我的bash不能执行任何操作,并且会收到成千上万的错误,如下所示:

' is invalid as numberor: '24
' is invalid as numberor: '22
' is invalid as numberor: '24
' is invalid as numberor: '23
' is invalid as numberor: '21
' is invalid as numberor: '22
' is invalid as numberor: '24
' is invalid as numberor: '23
' is invalid as numberor: '24
' is invalid as numberor: '12
' is invalid as numberor: '24
' is invalid as numberor: '28
' is invalid as numberor: '28
' is invalid as numberor: '28
' is invalid as numberor: '28
' is invalid as numberor: '28
' is invalid as numberor: '24
' is invalid as numberor: '22

。我需要改变什么?对于我的每一次帮助我都很感激。

善待黑胡子

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)