From 45775a1144edcdf3d79ef66b80c589251e02307d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 8 Mar 2023 15:27:48 +0800 Subject: [PATCH] RP @geekpi https://linux.cn/article-15607-1.html --- ... Wordsmith on the Linux command line with dict.md | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) rename {translated/tech => published}/20230206.1 â­ï¸â­ï¸ Wordsmith on the Linux command line with dict.md (85%) diff --git a/translated/tech/20230206.1 â­ï¸â­ï¸ Wordsmith on the Linux command line with dict.md b/published/20230206.1 â­ï¸â­ï¸ Wordsmith on the Linux command line with dict.md similarity index 85% rename from translated/tech/20230206.1 â­ï¸â­ï¸ Wordsmith on the Linux command line with dict.md rename to published/20230206.1 â­ï¸â­ï¸ Wordsmith on the Linux command line with dict.md index c9c30650da..349301908e 100644 --- a/translated/tech/20230206.1 â­ï¸â­ï¸ Wordsmith on the Linux command line with dict.md +++ b/published/20230206.1 â­ï¸â­ï¸ Wordsmith on the Linux command line with dict.md @@ -3,20 +3,24 @@ [#]: author: "David Both https://opensource.com/users/dboth" [#]: collector: "lkxed" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15607-1.html" 在 Linux 命令行上使用 dict 文字工具 ====== +![][0] + +> Linux 上的 dict 命令对作家æ¥è¯´éžå¸¸æœ‰ç”¨ï¼Œå¯ä»¥ä¸ºä»–们的选è¯æ供大é‡çš„字典和åŒä¹‰è¯ã€‚ + 作为一个作家,我ç»å¸¸éœ€è¦ç¡®å®šå•è¯çš„正确拼写或定义。我还需è¦ä½¿ç”¨è¯åº“æ¥å¯»æ‰¾æ›¿ä»£è¯ï¼Œè¿™äº›è¯çš„内涵å¯èƒ½ä¸Žæˆ‘å¯èƒ½ä½¿ç”¨çš„è¯æœ‰äº›ä¸åŒã€‚因为我ç»å¸¸ä½¿ç”¨ Linux 命令行和文本模å¼å·¥å…·æ¥å®Œæˆæˆ‘的大部分工作,所以使用命令行è¯å…¸æ˜¯æœ‰æ„义的。 我éžå¸¸å–œæ¬¢ä½¿ç”¨å‘½ä»¤è¡Œï¼ŒåŽŸå› æœ‰å¾ˆå¤šï¼Œå…¶ä¸­æœ€ä¸»è¦çš„原因是它对我æ¥è¯´æ›´æœ‰æ•ˆçŽ‡ã€‚它也比任何一本或多本实体纸质字典,都è¦å…¨é¢å¾—多。我使用 Linux çš„ `dict` 命令已ç»å¾ˆå¤šå¹´äº†ï¼Œæˆ‘å·²ç»å¼€å§‹ä¾èµ–它了。 ### 在 Linux 上安装 dict -dict 程åºåœ¨ Fedora 上没有默认安装,但它很容易安装。以下是如何在 Fedora 或类似å‘行版上安装: +`dict` 程åºåœ¨ Fedora 上没有默认安装,但它很容易安装。以下是如何在 Fedora 或类似å‘行版上安装: ``` $ sudo dnf install dictd @@ -24,12 +28,11 @@ $ sudo dnf install dictd 在 Debian 和类似å‘行版上,你还必须安装字典定义: - ``` $ sudo apt install dictd dict-gcide ``` -ä¸éœ€è¦é¢å¤–çš„é…置。最简å•çš„ `/usr/share/doc/dictd/dict1.conf` 文件指定了字典数æ®åº“的远程æœåŠ¡å™¨ã€‚这个工具使用字典æœåŠ¡å™¨å议(DICT),端å£ä¸º 2628。 +ä¸éœ€è¦é¢å¤–çš„é…置。这个éžå¸¸ç®€å•çš„ `/usr/share/doc/dictd/dict1.conf` 文件指定了字典数æ®åº“的远程æœåŠ¡å™¨ã€‚这个工具使用字典æœåŠ¡å™¨å议(DICT),端å£ä¸º 2628。 ### 在 Linux 上使用 dict @@ -105,7 +108,7 @@ $ dict "air gapped" ### å­—å…¸ -`dict` 命令使用一些在线字典,包括法律和技术字典。许多语言的字典也是å¯ç”¨çš„。你å¯ä»¥`列出`å¯ç”¨çš„字典数æ®åº“,如下é¢æ‰€ç¤ºï¼š +`dict` 命令使用一些在线字典,包括法律和技术字典。许多语言的字典也是å¯ç”¨çš„。你å¯ä»¥â€œåˆ—出â€å¯ç”¨çš„字典数æ®åº“,如下é¢æ‰€ç¤ºï¼š ``` $ dict -D | less @@ -143,7 +146,7 @@ $ dict -d gcide 有时使用è¯åº“中的è¯æ±‡å¹¶ä¸æ˜¯æœ€å¥½çš„写作方法,因为它å¯èƒ½ä¼šæ··æ·†ä½ çš„æ„æ€ã€‚但我确实å‘现 `dict` 命令在为特定的æ„æ€é€‰æ‹©æœ€å¥½çš„è¯æ–¹é¢æœ‰æžå¤§çš„帮助。它还能确ä¿æˆ‘使用的å•è¯æ‹¼å†™æ­£ç¡®ã€‚ -关于 dict çš„ä¿¡æ¯å¾ˆåŒ®ä¹ã€‚ 这个 URL [http://www.dict.org/][1] åªæ供了一个基于网络的字典界é¢ã€‚手册页涵盖了语法。但是这个命令是一个有用的ã€æœ‰è¶£çš„命令,å¯ä»¥éšèº«æºå¸¦ã€‚我承认在å‘现 `dict` 命令åŽï¼Œæˆ‘花了很多时间å°è¯•ä¸åŒçš„东西,看看结果会是什么。我就是那个读百科全书和字典的孩å­ã€‚是的,我是_那个_å­©å­ã€‚除了在写作或阅读时是一个有用的工具外,dict 也å¯ä»¥æ˜¯ä¸€ä¸ªæœ‰è¶£çš„工具æ¥æ»¡è¶³ä¸€ä¸‹å¥½å¥‡å¿ƒã€‚ +关于 dict çš„ä¿¡æ¯å¾ˆåŒ®ä¹ã€‚ 这个 URL [http://www.dict.org/][1] åªæ供了一个基于网络的字典界é¢ã€‚手册页涵盖了语法。但是这个命令是一个有用的ã€æœ‰è¶£çš„命令,å¯ä»¥éšèº«æºå¸¦ã€‚我承认在å‘现 `dict` 命令åŽï¼Œæˆ‘花了很多时间å°è¯•ä¸åŒçš„东西,看看结果会是什么。我就是那个通读百科全书和字典的孩å­ã€‚是的,我是_那个_å­©å­ã€‚除了在写作或阅读时是一个有用的工具外,`dict` 也å¯ä»¥æ˜¯ä¸€ä¸ªæœ‰è¶£çš„工具æ¥æ»¡è¶³ä¸€ä¸‹å¥½å¥‡å¿ƒã€‚ -------------------------------------------------------------------------------- @@ -152,11 +155,11 @@ via: https://opensource.com/article/23/2/linux-dict-command 作者:[David Both][a] 选题:[lkxed][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) è£èª‰æŽ¨å‡º [a]: https://opensource.com/users/dboth [b]: https://github.com/lkxed [1]: http://www.dict.org/ - +[0]: https://img.linux.net.cn/data/attachment/album/202303/08/152653jojqqmv7x7wxzox7.jpg \ No newline at end of file