linux - 在linux系统的对话框中使用什么命令来显示日期/时间和日历?

标签 linux

我想使用 mobaXterm 术语在系统对话框中显示日期/时间和日历。我已经为日期和时间试过这个命令:

dialog --title "System date and time" --infobox "Date is 'date'"

对于我试过的日历:

dialog  --title "Calender" --infobox "'cat nenuchoice.temp.$$'" 10 12

最佳答案

只需使用反引号来分隔日期命令,而不是普通的撇号/单引号,或者使用 bash 特定的替代语法 $(date)

dialog --title "System date and time" --infobox "Date is `date`" 8 50

dialog --title "Calender" --infobox "`cat nenuchoice.temp.$$`" 10 12

dialog --title "System date and time" --infobox "Date is $(date)" 8 50

dialog --title "Calender" --infobox "$(cat nenuchoice.temp.$$)" 10 12

关于linux - 在linux系统的对话框中使用什么命令来显示日期/时间和日历?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42651574/

相关文章:

linux - 拦截读取特定文件的请求,并生成以编程方式读取的该文件的明显输出

linux - sed 任何整个单词搜索和替换

Java 内存不足,即使我给了它很多!

python - 如何在不更改 ubuntu 中的 linux 发行版的情况下升级 numpy

linux - 在 Debian 打包期间运行脚本

linux - 在 Linux 中将位置参数从脚本传递到下标的最佳方式

linux - 如何grep数字范围

regex - 如何计算同一正则表达式的每个不同匹配项的出现次数

linux - 运行非常简单的 shell 脚本时出现语法错误

linux - 如何识别远程 SSH 上的 BLANK 终端?