LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1127|回复: 4

nano的問題以及backtick的用法

[复制链接]
发表于 2011-6-28 07:47:18 | 显示全部楼层 |阅读模式
以前執行

  1. # nano -w 'kpsewhich ctex-xecjk-winfonts.def'
复制代码

可以打開ctex-xecjk-winfonts.def文件。

最近不知道更新了什麼包,使得上述命令執行是nano 找不到(nano不知道什麼時候被幹掉了);其次,換用

  1. # gedit 'kpsewhich ctex-xecjk-winfonts.def'
复制代码

發現只是在當前目錄下帶開了一個名為kpsewhich ctex-xecjk-winfonts.def的新文件。

請問這是怎麼回事?
发表于 2011-6-28 13:52:58 | 显示全部楼层
Your problem has nothing to do with gnome-terminal.

Change your title and read `How To Ask Questions The Smart Way' [1]

The nano problem is due to a bug of portage[2]. The work around is to add nano manually into @world even though it is already part of @system.

The second problem is that you are executing command without even understanding what it does. Replace you single quote with backtick.

[1] : http://www.catb.org/~esr/faqs/smart-questions.html
[2] : https://bugs.gentoo.org/show_bug.cgi?id=370295
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-6-28 19:43:14 | 显示全部楼层
Post by adaptee;2143522
Your problem has nothing to do with gnome-terminal.

Change your title and read `How To Ask Questions The Smart Way' [1]

The nano problem is due to a bug of portage[2]. The work around is to add nano manually into @world even though it is already part of @system.

The second problem is that you are executing command without even understanding what it does. Replace you single quote with backtick.

[1] : http://www.catb.org/~esr/faqs/smart-questions.html
[2] : https://bugs.gentoo.org/show_bug.cgi?id=370295


got it!
thank you!
回复 支持 反对

使用道具 举报

发表于 2011-6-29 02:10:34 | 显示全部楼层
除了`...`你也可以用$(...),这样就不会和引号混在一起。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-6-29 08:16:43 | 显示全部楼层
Post by mathfeel;2143560
除了`...`你也可以用$(...),这样就不会和引号混在一起。


BASH沒怎麼學過,全憑經驗。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表