尝试使用 linux bash 命令(awk、cut 或任何解决方案)按以下格式制作列表

Trying to make a list in the following format using linux bash commands (awk,cut, or any solution)

我一直在尝试列出我的本地服务器列表,其中包含在我这边自动化流程的凭据。这是我现在拥有的文件:

head hosts-only.txt
192.168.2.101
192.168.2.102
192.168.2.103
192.168.2.105
192.168.2.107

head user-only.txt
admin
tomcat
oracle

head pass-only.txt
123456
secret
secure

ofc,下面的密码不是真的,只是举个例子。现在,我想要完成的是获得一个 'list.txt' 包含以下格式的信息:

192.168.2.101:admin:123456
192.168.2.102:tomcat:secret
192.168.2.103:oracle:secure

如有任何帮助,我们将不胜感激,

谢谢!

看看

paste -d: hosts-only.txt user-only.txt pass-only.txt