Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对 bash 脚本非常陌生,只是想玩一下。
到目前为止,我已经创建了一个包含 2 个 IP 地址和 2 个网络掩码的文件,我已经获得了从该文件中打印地址和网络掩码并计算出地址网络号的代码,我只是想添加更多代码来简单地计算出有多少主机在该网络上,以及有多少其他网络共享相同的网络掩码。
我知道如何在纸上做到这一点,非常简单。
非常基本,我知道,只需要 bash 中的一些简单指针。
尝试ipcalc在shell中使用:
ipcalc