【问题标题】:translate shell how to get original language of the text?翻译shell如何获得文本的原始语言?
【发布时间】:2022-01-10 21:42:55
【问题描述】:

如何获取文本的原始语言?

我知道我可以使用 -id 来显示姓名、家庭、书写系统、代码等,但我只需要此列表中的代码。

trans -id  "how are you today?" -no-auto

因此,如果我在 shell 中编写上述内容,我会得到这个列表,我只想知道代码(英文):

英文名

印欧语系

拉丁文书写系统

编码

ISO 639-3 英文

SILhttps://iso639-3.sil.org/code/eng

声门
https://glottolog.org/resource/languoid/id/stan1293

维基百科https://en.wikipedia.org/wiki/ISO_639:eng

【问题讨论】:

  • 粘贴软件的准确输出时,请考虑使用代码段,以便保留准确的格式。以只有三个反引号的行开头(没有语法突出显示)紧跟单词none(没有空格);以包含三个反引号的行结束。

标签: linux shell translate


【解决方案1】:
$ trans -id  "how are you today?" -no-auto | grep Code | awk '{print $2}'

【讨论】:

  • 无需使用grep。这工作trans -id "how are you today?" -no-auto | awk '/^Code/ {print $2}'
猜你喜欢
  • 2011-06-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-04-23
  • 1970-01-01
  • 1970-01-01
  • 2012-02-12
  • 1970-01-01
相关资源
最近更新 更多