我一直在搜索,但没有找到一种明显的方法来了解 GRUB 是在系统引导中使用 UEFI,还是 BIOS 兼容模式,或完整的 BIOS。我只找到了Windows 方法。GRUB 或内核引导日志中是否有显示我使用的是 UEFI、EFI 或 BIOS 的内容?
我喜欢nano
并且经常使用它。一个相关的应用程序是rnano
.
从rnano
手册中:
DESCRIPTION\n rnano runs the nano editor in restricted mode. This allows editing\n only the specified file or files, and doesn't allow the user access to\n the filesystem nor to a command shell.\n\n In restricted mode, nano will:\n\n \xe2\x80\xa2 not allow suspending;\n\n \xe2\x80\xa2 not allow saving the current buffer under a different name;\n\n \xe2\x80\xa2 not allow inserting another file or opening a new buffer;\n\n \xe2\x80\xa2 not allow appending or prepending to …
Run Code Online (Sandbox Code Playgroud) 我有一个有一百多行的文本文件,每一行都是一个sh命令:
echo foo
...
echo bar
Run Code Online (Sandbox Code Playgroud)
我正在寻找一个可以从终端调用的sh命令,该终端将从与指定行号关联的所述文件运行该命令。我不希望终端显示通常与终端中运行的命令关联的与系统相关的内容。
例如,如果我使用类似的东西xdotool type "$(sed -n 1p file)" &
(请注意,我愿意接受更优雅的命令),
我得到以下终端输出:
[1] 9531
user@host:~$ echo foo
Run Code Online (Sandbox Code Playgroud)
我想压制这条[1] 9531
线。但请记住,我不希望抑制回显条线,因为这是我有机会验证我是否要执行所需命令而不是其他命令的地方。我也不希望命令提示符左侧显示任何文本。
然后我按下键盘上的 <Enter> 键并得到:
foo
[1]+ Done xdotool type "$(sed -n 1p file)" &
user@host:~$
Run Code Online (Sandbox Code Playgroud)
我想压制这条[1]+ Done...
线。
如何抑制这两条线的终端输出?我已经尝试了所有我能找到的重定向方案,但没有任何乐趣。