我有一个服务器列表的文件:GNOME终端选项卡中打开多个SSH连接
SERVERS.TXT:
192.168.0.100
192.168.0.101
192.168.0.102
从GNOME终端剧本,我想打开一个新的终端,具有每个服务器的选项卡。
这里是我的尝试:
gnome-terminal --profile=TabProfile `while read SERVER ; do echo "--tab -e 'ssh [email protected]$SERVER'"; done < SERVERS.TXT`
以下是错误:
Failed to parse arguments: Argument to "--command/-e" is not a valid command: Text ended before matching quote was found for '. (The text was ''ssh')
试过-e
gnome-terminal --profile=TabProfile `while read SERVER ; do echo "--tab -e'ssh [email protected]$SERVER'"; done < SERVERS.TXT`
后除去空间,我收到了类似的错误:
Failed to parse arguments: Argument to "--command/-e" is not a valid command: Text ended before matching quote was found for '. (The text was '[email protected]'')
显然有一个解析错误,因为外壳是试图通过使用空间预测和地方分隔符的帮助。服务器文件如有更改,恕不另行通知,需要查看许多不同的服务器组。