草庐IT

NetRange

全部标签

linux - grep 输出仅在 bash 脚本中打印单行

这个问题在这里已经有了答案:Ijustassignedavariable,butecho$variableshowssomethingelse(7个答案)关闭6年前。我怎样才能让grep的结果在bash脚本中打印在他们自己的行上?在终端中使用grep时,输出结果如我所愿。例如:$whoisx.x.85.72|grep'OrgName\|NetRange\|inetnum\|IPv4'NetRange:x.x.85.64-x.x.85.95NetRange:x.x.0.0-x.x.255.255OrgName:xxxxxTechnologiesInc.在bash中使用相同的grep命令时

linux - grep 输出仅在 bash 脚本中打印单行

这个问题在这里已经有了答案:Ijustassignedavariable,butecho$variableshowssomethingelse(7个答案)关闭6年前。我怎样才能让grep的结果在bash脚本中打印在他们自己的行上?在终端中使用grep时,输出结果如我所愿。例如:$whoisx.x.85.72|grep'OrgName\|NetRange\|inetnum\|IPv4'NetRange:x.x.85.64-x.x.85.95NetRange:x.x.0.0-x.x.255.255OrgName:xxxxxTechnologiesInc.在bash中使用相同的grep命令时