有没有办法直接在终端上通过管道传输 deluge-console 命令?
我想做点什么:
deluge-console; add torrent-file-url.torrent
我知道当您运行时,deluge-console您将被重定向到常规终端顶部的另一个屏幕。我想将其包装在 bash 脚本中。
从deluge-console手册页:
您可以直接从命令行传递控制台命令,并通过用分号 (;) 分隔来运行多个命令。
deluge-console add torrent-file-url.torrent
deluge-console add torrent-file-url.torrent; info torrent_id
Run Code Online (Sandbox Code Playgroud)
为了防止文件名中出现空格问题,请在整个命令字符串周围使用引号,例如
deluge-console "add torrent-file-url.torrent; info torrent_id"
Run Code Online (Sandbox Code Playgroud)