[英]Error while running xterm in telnet script
This is error while running the telnet script. 运行telnet脚本时,这是错误。 Language: Shell script 语言:Shell脚本
Error: 错误:
Type xterm -help for a full description. 键入xterm -help以获得完整描述。
xterm: Explicit shell already was /root/Desktop/stage2/./close_telnet.sh
xterm: bad command line option "192.168.0.1 25"
usage: xterm [-/+132] [-C] [-Sccn] [-T string] [-/+ah] [-/+ai] [-/+aw]
[-b number] [-/+bc] [-bcf milliseconds] [-bcn milliseconds] [-bd color]
[-/+bdc] [-bg color] [-bw number] [-/+cb] [-cc classrange] [-/+cjk_width]
[-class string] [-/+cm] [-/+cn] [-cr color] [-/+cu] [-/+dc]
[-display displayname] [-e command args ...] [-fa pattern] [-fb fontname]
[-/+fbb] [-/+fbx] [-fd pattern] [-fg color] [-fi fontname] [-fn fontname]
[-fs size] [-/+fullscreen] [-fw fontname] [-fwb fontname] [-fx fontname]
[%geom] [#geom] [-geometry geom] [-help] [-/+hm] [-/+hold] [-iconic]
[-/+ie] [-/+im] [-into windowId] [-/+j] [-/+k8] [-kt keyboardtype] [-/+l]
[-/+lc] [-lcc path] [-leftbar] [-lf filename] [-/+ls] [-/+maximized]
[-/+mb] [-mc milliseconds] [-/+mesg] [-/+mk_width] [-ms color] [-n string]
[-name string] [-nb number] [-/+nul] [-/+pc] [-/+pob] [-report-colors]
[-report-fonts] [-rightbar] [-/+rv] [-/+rvc] [-/+rw] [-/+s] [-/+samename]
[-/+sb] [-selbg color] [-selfg color] [-/+sf] [-sh number] [-/+si] [-/+sk]
[-sl number] [-/+sm] [-/+sp] [-/+t] [-ti termid] [-title string]
[-tm string] [-tn name] [-/+u8] [-/+uc] [-/+ulc] [-/+ulit] [-/+ut] [-/+vb]
[-version] [-/+wc] [-/+wf] [-xrm resourcestring] [-ziconbeep percent]
Type xterm -help for a full desc
Please suggest any idea to solve this error. 请提出解决此错误的任何想法。
The likely problem is that $window_id
is an empty value. 可能的问题是$window_id
是一个空值。 That would produce the error message from xterm. 这将产生来自xterm的错误消息。
In a quick check, I have the output from wmctrl -lp
as 快速检查中,我将wmctrl -lp
的输出wmctrl -lp
为
$ wmctrl -lp
0x00400023 0 1036 localhost.localdomain [!./bar] - vile
0x00a0000a 0 3981 localhost.localdomain xclock xclock
but the output of the expression with xprop
is 0x0400023
(a different number of leading zeros). 但使用xprop
的表达式的输出为0x0400023
(不同数量的前导零)。
If I change the fragment 如果我改变片段
awk '{print $5}' | sed 's/,//' | sed 's/^0x/0x0/'
to 至
awk '{sub(",","",$5);printf("%#010x",$5);}'
it gives a usable result (for my machine: ymmv ). 它给出了可用的结果(对于我的机器: ymmv )。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.