我有一个问题,~/.ssh/config.
我有 300 台主机,我需要以 root 身份而不是我的身份。我编写了为我创建配置文件的脚本,它为我提供了包含四行的配置文件:
host *
user me
host <here 300 hostnames seperated by space and in this same line all>
user root
Run Code Online (Sandbox Code Playgroud)
当我想通过 ssh 连接到任何服务器时,我收到消息,我有一个“第 10 行配置错误”或“...第 6 行”:/
wc -l .ssh/config
Run Code Online (Sandbox Code Playgroud)
给我 4
我有一个班轮:
az account list -o table |perl -lane 'print $F[0] if /GS/i'
Run Code Online (Sandbox Code Playgroud)
我想将默认分隔符从“\t”更改为“-”
有任何提示如何执行此操作吗?
只是想强调一下,我正在寻找的是 oneliner ;)
如何使用 perl 执行此 sed 空行删除: sed '/^$/d'
有print unless方法,但我的意思是更“就像在 sed 中一样”,因为您通过perl -ne 's/<pattern//g'