当前位置:网站首页>shell取某一时间范围内月份
shell取某一时间范围内月份
2022-07-23 05:41:00 【AA赵师傅】
#!/bin/sh
if [ -n "$1" ] ;then
do_date=$1
else
do_date=`date -d "-1 day" +%Y-%m-%d`
fi
end_date="2018-01-01"
>./month_num.txt
while [[ $do_date > $end_date ]]
do
echo ${do_date:0:7} >>./month_num.txt
do_date=`date -d "-1 month $do_date" +%Y-%m-%d`
done
边栏推荐
- Burpsuite learning notes
- MySQL account management & four engines & database and table building
- TypeScript介绍
- Constructor, prototype chain, instanceof
- Usage of some, every, find, FindIndex
- User defined MVC usage & addition, deletion, modification and query
- Understanding of closures of JS
- How to customize JSP Tags
- window运行gradle build -- --stacktrace出现找不到文件framework-4.3.0.BUILD-SNAPSHOT-schema.zip异常
- DVWA学习笔记
猜你喜欢

MySQL add, delete, modify, query & advanced query statements

The tree form based on El table and JS xlsx realize the function of downloading excel (II)

Customize foreach tags & select tags to echo data

Common errors in C language debugging -- brief answer
D2dengine edible tutorial (1) -- the simplest program

TypeScript介绍

my_ Implementation of strcpy (classic, simple, practical, collection)

Custom MVC (Part 2)

页面实现 “实时数据响应” 的注意事项

Command Execution Vulnerability and defense
随机推荐
再见if-else
Understanding of closures of JS
Common bypass methods for file upload vulnerabilities
mysql修改函数权限未生效
Vite x sigma creates designer specific I18N plug-ins
Resizeobserver ignoring buried point records - loop limit exceeded
MySQL增删改查&&高级查询语句
kubesphere HA install (二)
The object in $attrs doesn't change, but it triggers watch listening?
数字藏品系统开发/数字藏品方案介绍
Vite X Figma 打造设计师专属的 i18n 插件
ETH转账次数达到一个月高点
Genesis provided a loan of US $2.36 billion to Sanya capital
Genesis曾向三箭资本提供23.6亿美元的贷款
xtu-ctf Challenges-Reverse 1、2
Use require.context to complete batch import of local pictures
Laravel API interface + token authentication login
Custom MVC (Part 1)
mysql根据中文字段首字母排序
构造函数,原型链,instanceOf