我正在编写一个 shell 脚本,它需要一段时间(以分钟为单位)并为该数量打开一个在线鸡蛋计时器。
#!/bin/bash
#Opens http://e.ggtimer.com/TIMEmin where TIME = number of minutes
TIME=5
xdg-open http://e.ggtimer.com/"$TIME"min
Run Code Online (Sandbox Code Playgroud)
当我运行上面的脚本时,它会打开网页http://e.ggtimer.com/5min 我想从终端设置时间。例如:
eggtimer 10
Run Code Online (Sandbox Code Playgroud)
谢谢!