CentOS8运行./VBoxLinuxAdditions.run
出现如下错误:
Kernel headers not found for target kernel 4.18.0-193.6.3.el8_2.x86_64. Please install them and execute /sbin/rcvboxadd setup
ValueError: File context for /opt/VBoxGuestAdditions-6.0.22/other/mount.vboxsf already defined
modprobe vboxguest failed
Run Code Online (Sandbox Code Playgroud)
如何安装所需的内核头文件?
学习 bash 脚本,我正在尝试使用 for 循环中的嵌套 grep 来过滤结果:
sample filenames:
this-file_AAC.txt
this-other_file_AAAC.txt
yep-a-file_AAC.nfo
oops_another_one.reamde
Run Code Online (Sandbox Code Playgroud)
这是脚本:
shopt -s globstar nullglob dotglob
for file in ./**/*.{txt,reamde,nfo}; do
printf "input: ${file}\n"
if grep -qF _AAC $file; then
printf "output: ${file}\n"
# do stuff with $file
fi
done
Run Code Online (Sandbox Code Playgroud)
这个想法是任何包含的文件都_AAC
将对其应用操作;在这种特定情况下,只需打印到标准输出即可确认结果是否正确。
问题是:没有什么可以超越if
陈述。所以我错过了我不知道什么。唯一有效的就是这printf "input...
条线。
我缺少什么?