从今天起 Debian 出现错误:ifup: 无法读取接口文件“/etc/network/interfaces”
如果我查找接口文件,我会看到以下内容:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet dchp
allow-hotplug eth1
iface eth1 inet dchp
Run Code Online (Sandbox Code Playgroud)
我在 Virtual Box 中运行 Debian;eth0 是一个 NAT,而 eth1 是一个仅主机适配器我也尝试过插入以太网电缆,但这没有改变。
我怎样才能摆脱这个错误?
先感谢您,
雷姆科
我正在尝试在 bash 中解析一个字符串的文本,然后我可以在其中抛出一个案例选择,但是我在试图弄清楚如何去做时遇到了最大的麻烦。在 VB 中,我知道它真的很简单
someString = "Hey there"
Select Case Mid(someString,1,5)
Case "Hey t" 'Do something
Case "Go aw" 'Do something else
Case 'Else
'String is unrecognized
End Select
Run Code Online (Sandbox Code Playgroud)
我似乎找不到任何说明如何执行与 Mid 函数等效的字符串操作函数的内容。我是否使用sed
,我不相信我可以使用,awk
或者cut
因为我不想根据模式修剪字符串,但肯定它必须在 Unix 中一样简单。