我有一个包含如下文本的文件:
{名称:“乔恩”,孩子:[{i:1,n:“tyrell”},{i:2,n:“angela”},{i:3,n:“elliot”}]
我想要实现的是用“:i”删除每个字符串,所以在这种情况下它看起来像这样
{名称:“乔恩”,孩子:[{n:“tyrell”},{n:“angela”},{n:“elliot”}]
因此,如果有一个“i:”,它应该删除所有内容(包括 i:),直到逗号“,”
我怎么能做到这样的事情?
我有一个包含如下文本的文件:
{名称:“乔恩”,孩子:[{i:1,n:“tyrell”},{i:2,n:“angela”},{i:3,n:“elliot”}]
我想要实现的是用“:i”删除每个字符串,所以在这种情况下它看起来像这样
{名称:“乔恩”,孩子:[{n:“tyrell”},{n:“angela”},{n:“elliot”}]
因此,如果有一个“i:”,它应该删除所有内容(包括 i:),直到逗号“,”
我怎么能做到这样的事情?
当我编写如下 bash 脚本时:
#!/bin/bash
nc localhost [pseudoport]
echo "test"
它连接到服务器但不发送文本“test”。
它适用于
#!/bin/bash
echo "test" | nc localhost [pseudoport]
这里的问题是在收到某些内容后连接退出。
如何发送多条消息,在我的情况下是固定前导码,后跟可变数据?
我正在尝试在 Ubuntu 16.04 上安装 cuda,所以我首先要做的是检查预安装操作并验证我的系统是否满足依赖项。
我删除了与 nvidia 相关的所有内容,下载了 .deb 文件并安装了它。
之后,我将以下内容添加到 PATH 变量中:
export PATH=/usr/local/cuda-9.1/bin${PATH:+:${PATH}}
现在我尝试了这个命令:
cat /proc/driver/nvidia/version
但在 proc/driver/ 目录中没有 nvidia 文件夹...
如果它尝试make
一个示例,我会收到错误,因为没有库或什至已经安装了所有东西。
我现在正在尝试 3 天:/
当我输入以下内容时:
apt-cache policy libdns162
我收到这个输出:
libdns162:
Installed: 1:9.10.3.dfsg.P4-8ubuntu1.8
Candidate: 1:9.10.3.dfsg.P4-8ubuntu1.10
输入后我得到以下信息:
sudo apt-get install --only-upgrade libdns162
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
clang-format clang-format-3.8 libclang1 libclang1-3.8 libffi-dev libjavascriptcoregtk-1.0-0 liblldb-3.6 liblldb-3.8 libtinfo-dev libuv1 libwebkitgtk-1.0-0
libwebkitgtk-1.0-common linux-headers-4.10.0-28 linux-headers-4.10.0-28-generic linux-headers-4.10.0-38 linux-headers-4.10.0-38-generic linux-headers-4.10.0-40
linux-headers-4.10.0-40-generic linux-image-4.10.0-28-generic linux-image-4.10.0-38-generic linux-image-4.10.0-40-generic linux-image-extra-4.10.0-28-generic
linux-image-extra-4.10.0-38-generic linux-image-extra-4.10.0-40-generic linux-signed-image-4.10.0-28-generic linux-signed-image-4.10.0-38-generic
linux-signed-image-4.10.0-40-generic lldb lldb-3.8 llvm-3.8 llvm-3.8-dev llvm-3.8-runtime nodejs python-lldb-3.8
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
libdns162
1 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
3 not fully installed or removed.
Need to get 0 B/880 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
E: Invalid archive member header
E: Prior errors apply to /var/cache/apt/archives/libdns162_1%3a9.10.3.dfsg.P4-8ubuntu1.10_amd64.deb
debconf: apt-extracttemplates failed: No such file or directory
(Reading database ... 325831 files and directories currently installed.)
Preparing to unpack .../libdns162_1%3a9.10.3.dfsg.P4-8ubuntu1.10_amd64.deb ...
Unpacking libisccfg140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.10) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
dpkg: error processing package libdns162:amd64 (--configure):
package libdns162:amd64 is already installed and configured
Setting up libisccfg140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
dpkg: dependency problems prevent configuration of bind9-host:
bind9-host depends on libdns162 (= 1:9.10.3.dfsg.P4-8ubuntu1.10); however:
Version of libdns162:amd64 on system is 1:9.10.3.dfsg.P4-8ubuntu1.8.
dpkg: error processing package bind9-host (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of dnsutils:
dnsutils depends on libdns162 (= 1:9.10.3.dfsg.P4-8ubuntu1.10); however:
Version of libdns162:amd64 on system is 1:9.10.3.dfsg.P4-8ubuntu1.8.
dnsutils depends on bind9-host | host; however:
Package bind9-host is not configured yet.
Package host is not installed.
Package bind9-host which provides host is not configured yet.
dpkg: error processing package dnsutils (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
libdns162:amd64
bind9-host
dnsutils
E: Sub-process /usr/bin/dpkg returned an error code (1)
我该如何安装:
1:9.10.3.dfsg.P4-8ubuntu1.10