以下命令生成日期 Sept18_1024x728.jpg 我该如何制作它,以便它会使用 sept18_1024x728.jpg 对其进行格式化?
cp "$p" "./FOLDER/$(date +%b%d).$SIZE.jpg"
最佳答案
您可以通过tr
管道将大写转换为小写:
cp "$p" "./FOLDER/$(date +%b%d | tr A-Z a-z).$SIZE.jpg"
或者区域设置感知版本:
cp "$p" "./FOLDER/$(date +%b%d | tr '[:upper:]' '[:lower:]').$SIZE.jpg"
关于Bash shell 如何将日期格式化为小写月份?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52394361/