AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1062938
Accepted
fulltimecoder
fulltimecoder
Asked: 2018-08-07 08:14:00 +0800 CST2018-08-07 08:14:00 +0800 CST 2018-08-07 08:14:00 +0800 CST

使用 gcalccmd 在 Ubuntu 服务器中转换货币的命令

  • 772
  1. 我可以gcalccmd在 Ubuntu 服务器中使用,就像在 Ubuntu 桌面的终端中使用一样吗?如果是,我可以像使用gnome-terminalin一样使用命令转换货币吗financal mode
  2. 如果是,转换货币的命令行是什么?(例如:1 美元兑新元)

    2.1 兑换货币有限制吗?(例如:一天最多 100 次)

server gcalctool calculator gnome-calculator
  • 1 1 个回答
  • 1539 Views

1 个回答

  • Voted
  1. Best Answer
    24601
    2018-08-07T10:16:40+08:002018-08-07T10:16:40+08:00

    您可以从 Ubuntu 软件中心下载 qalculate。此应用程序允许您从命令行下载当前汇率并计算汇率。

    $ sudo apt install qalc
    $ qalc
    > 1 GBP to euro
    It has been 750 day(s) since the exchange rates last were updated.
    Do you wish to update the exchange rates now? yes
    
      1 * GBP = approx. EUR 1.1756407
    
    > 1 GBP to USD
    
      1 * GBP = approx. $1.3931343
    
    > 
    

    然后,您可以在终端中使用命令 exrates 更新速率。在工具中使用命令行帮助可查看可用的各种命令。

    $ qalc
    > help
    
    Enter a mathematical expression or a command and press enter.
    Complete functions, units and variables with the tabulator key.
    
    Available commands are:
    
    approximate
    assume ASSUMPTIONS
    base BASE
    delete NAME
    exact
    exrates
    factor
    find/list [NAME]
    function NAME EXPRESSION
    info
    mode
    partial fraction
    save/store NAME [CATEGORY] [TITLE]
    save definitions
    save mode
    set OPTION VALUE
    expand
    to/convert UNIT or "TO" COMMAND
    variable NAME EXPRESSION
    quit/exit
    
    Commands for RPN mode:
    rpn STATE
    stack
    clear stack
    copy [INDEX]
    
    move INDEX 1 INDEX 2
    pop [INDEX]
    rotate [DIRECTION]
    swap [INDEX 1] [INDEX 2]
    
    Type help COMMAND for more information (example: help save).
    Type info NAME for information about a function, variable or unit (example: info sin).
    When a line begins with '/', the following text is always interpreted as a command.
    
    For more information about mathematical expression, different options, and a complete list of functions, variables and units, see the
    relevant sections in the manual of the graphical user interface (available at http://qalculate.github.io/manual/index.html).
    

    您需要安装 qalc(但未运行),然后您可以使用(例如)从命令行或脚本调用汇率:

    1 GBP to EUR

    您也可以使用qalc -t 1 GBP to EUR(-t = 简洁,与详细相反),但您也可以使用 awk 命令仅拆分值,如下所示:

    awk -F' ' '{print $2}' <<< `qalc -t 500 GBP to EUR`

    这将给出值 560.63584(以给定的速率)

    • 4

相关问题

  • 使用 dpkg 手动安装软件包是否会阻止未来的升级路径?

  • 如何从命令行刻录双层 dvd iso

  • 如果在服务器机器上运行 Ubuntu 桌面版,性能损失是多少?

  • 将桌面版剥离为服务器版的最简单方法是什么?

  • 如何与无头服务器进行图形交互?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve