我想从终端修改一堆文本文件,更精确:
将字符串 '50' 添加到 /mydat/ 中每个文本文件的第一行?
或者,如果您知道 Web 上某个页面的链接,该页面列出了从 shell 操作文本文件的命令...
我不小心在 Kile 的字典中添加了“迭代”(右键单击错误的按钮)。现在我想从正确的单词列表中删除 'itterative' 但我再也找不到字典了( settings->configure kile 中的旧链接)没有链接到它以前的位置...
提前致谢,
PS:我使用 Kile 作为开箱即用......没有特殊设置 no-nothing
编辑
在下面解决 Oli 的回答。Kcontrol 不在 10.10 reps 中(显然)下载 .tar.gz 版本的 kcontrol 并安装它,键入:
cd ~/Documents/khepera
SUBDIRS="libtns_util libxfgc libkhepera kcontrol"
for i in $SUBDIRS ; do make -C $i install; done
for i in $SUBDIRS; do make -C $i clean; done
for i in $SUBDIRS; do make -C $i tgz; done
Run Code Online (Sandbox Code Playgroud)
造成大量错误。我想他们可以解决,但仅仅找到 Kile 的字典似乎有点过头了。还有其他想法吗?
我填写了这个答案中的详细信息。但是当我尝试连接时,我得到:
VPN Connection Failed '...because the VPN service stopped'
Run Code Online (Sandbox Code Playgroud)
跑步
tail -f /var/log/syslog
Run Code Online (Sandbox Code Playgroud)
给我这个:
Mar 9 21:34:20 me NetworkManager[6063]: ** Message: pppd started with pid 8330
Mar 9 21:34:20 me NetworkManager[6063]: <info> [1489091660.9205] vpn-connection[0x1e067e0,54552dfa-6db2-4050-8b47-fd108b79f201,"VPN connection 1",0]: VPN plugin: state changed: starting (3)
Mar 9 21:34:20 me pppd[8330]: Plugin /usr/lib/pppd/2.4.7/nm-pptp-pppd-plugin.so loaded.
Mar 9 21:34:20 me NetworkManager[6063]: Plugin /usr/lib/pppd/2.4.7/nm-pptp-pppd-plugin.so loaded.
Mar 9 21:34:20 me NetworkManager[6063]: ** Message: nm-pptp-ppp-plugin: (plugin_init): initializing
Mar 9 21:34:20 me pppd[8330]: pppd 2.4.7 started by …Run Code Online (Sandbox Code Playgroud) 考虑这个文件:
#!/usr/bin/env bash
cat > example_file.txt <<EOL
|dms,wew,qwqw|
|m|head1|
|3,4,6|
|3e,2,23|
|m|head2|
|xw,12,2123|
|23,d,213|
|23,22q,2skl|
|m|head1|
|dljs,wqpw,2;a|
|dllw,w1p,1q;a|
EOL
Run Code Online (Sandbox Code Playgroud)
每隔一段时间,就会有一个保护模式:一行以:
|m|
Run Code Online (Sandbox Code Playgroud)
(是的,文件的第一行不需要是保护模式)现在我只想打印最后一个保护模式的那些行:
|m|head1|
Run Code Online (Sandbox Code Playgroud)
并忽略所有其他行。在其他最坏的情况下,我希望输出为:
#!/usr/bin/env bash
cat > desired_result_file.txt <<EOL
|m|head1|
|3,4,6|
|3e,2,23|
|m|head1|
|dljs,wqpw,2;a|
|dllw,w1p,1q;a|
EOL
Run Code Online (Sandbox Code Playgroud) 显然,这是一个反复出现的问题。我试过System->Preferences->Mouse但它没有帮助。
网上有很多关于这方面的信息,但它已经过时了(Ubuntu 7.04 和 8.04)。
有关如何解决此问题的任何提示?
所以我已经设置了 geany 与终端一起使用。我的下一个问题是如何设置键盘快捷键将当前选择的代码发送到终端?
截至今天,这已由最新的 nvidia-current 更新修复:)
直到上周,我才设置了一个工作 bumblee/nvidia。
现在,当我做
optirun -vv firefox
Run Code Online (Sandbox Code Playgroud)
迎接我的是:
[ 6174.504548] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 6174.632794] [DEBUG]optirun version 3.0.1 starting...
[ 6174.632850] [DEBUG]Active configuration:
[ 6174.632861] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 6174.632872] [DEBUG] X display: :8
[ 6174.632883] [DEBUG] LD_LIBRARY_PATH:
[ 6174.632893] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 6174.632902] [DEBUG] VGL Compression: proxy
[ 6174.737261] [INFO]Response: No - error: Could not load GPU driver
[ 6174.737309] [ERROR]Cannot access secondary GPU - error: Could not load GPU driver
[ …Run Code Online (Sandbox Code Playgroud) 我正在使用 T-bird 17.0.8。我需要找回 Thunderbird 用来连接到我的电子邮件帐户的密码,因为我忘记了它。此链接似乎解释了解决方案,但这是针对较旧版本的 Thunderbird,我再也无法在“工具”菜单中找到“选项”链接。
(我已尝试按照此处的说明进行操作。我无法使用 Anaconda)
sudo apt-get install spyder3
Run Code Online (Sandbox Code Playgroud)
安装 150MB 的好东西。然后,我这样做:
pip install -U spyder
Run Code Online (Sandbox Code Playgroud)
然后我做
spyder3
Run Code Online (Sandbox Code Playgroud)
我得到:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/spyder/utils/external/lockfile.py", line 150, in lock
symlink(str(os.getpid()), self.name)
FileExistsError: [Errno 17] File exists: '4809' -> '/home/me/.config/spyder-py3/spyder.lock'## Heading ##
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/spyder/utils/external/lockfile.py", line 177, in lock
kill(int(pid), 0)
ProcessLookupError: [Errno 3] No such process
During handling of the above exception, another exception occurred:
Traceback (most …Run Code Online (Sandbox Code Playgroud) cat -e file.txt 给出:
{"yellow":"mango"}^M$
^M$
{"yellow":"banana"}^M$
^M$
{"yellow":"blabla"}^M$
^M$
Run Code Online (Sandbox Code Playgroud)
我只想拥有:
{""yellow":"mango"}^M$
{"yellow":"banana"}^M$
{"yellow":"blabla"}^M$
Run Code Online (Sandbox Code Playgroud)
适用于文件夹中带有 txt 扩展名的所有文件。所以我试过:
find . -type f -name "*.txt" -print0 | xargs -0 sed -i "s/^M$^M$/^M$/g"
Run Code Online (Sandbox Code Playgroud)
无济于事。有没有人有更好的主意?
head -n 3 file.txt | od -bc
Run Code Online (Sandbox Code Playgroud)
产量:
0000000 173 042 171 145 154 154 157 167 042 072 042 155 141 156 147 157
{ " y e l l o w " : " m a n g o
0000020 042 175 015 012 015 012 173 …Run Code Online (Sandbox Code Playgroud)