这是我.fluxbox/startup
文件 的一部分
(a=($(grep "^1 " $HOME/Documents/4.n3u|awk '{print "/home/g" $2}'|sort -R|head -20)); \
xterm -e mpg123 -C ${a[@]} &>$HOME/Documents/mpg123.dat &)
如所写,重定向失败,所有此类输出都出现在xterm
。xterm
部分读取 的手册页,
-e program [ arguments ... ]
This option specifies the program (and its command line argu‐
ments) to be run in the xterm window. It also sets the window
title and icon name to be the basename of the program being
executed if neither -T nor -n are given on the command line.
This must be the last option on the command line.
mpg123
根据需要播放数组 a 的内容,并且可以根据选项-C
指定通过键盘进行控制,但xterm
似乎会阻碍重定向到文件。在这种情况下可以进行重定向吗?
或者,我可以在没有xterm
to contain的情况下运行它mpg123
,在这种情况下,我会获得重定向,但无法mpg123
通过键盘进行控制,因为它在某些后台子shell 中运行而没有与键盘的连接。有没有办法建立这种联系?