gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-04 12:33:29 24 4
gpt4 key购买 nike

我想使用 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com