⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex51.sh

📁 Shall高级编程
💻 SH
字号:
#!/bin/bash# Exercising the 'date' commandecho "The number of days since the year's beginning is `date +%j`."# Needs a leading '+' to invoke formatting.# %j gives day of year.echo "The number of seconds elapsed since 01/01/1970 is `date +%s`."#  %s yields number of seconds since "UNIX epoch" began,#+ but how is this useful?prefix=tempsuffix=$(date +%s)  # The "+%s" option to 'date' is GNU-specific.filename=$prefix.$suffixecho $filename#  It's great for creating "unique" temp filenames,#+ even better than using $$.# Read the 'date' man page for more formatting options.exit 0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -