티스토리 뷰

728x90
date +%Y%m%d -d 'next sunday - 1 week'

https://stackoverflow.com/questions/56388396/how-to-get-last-sundays-date-from-todays-date-using-shell-script

 

How to get last sunday's date from today's date using shell script?

I want to print the date of last Sunday by taking today's date as input for all days of the week except Sunday, but if it is Sunday then it should print today's date. I tried this, a=`date -dlast-

stackoverflow.com

 

728x90

'공부' 카테고리의 다른 글

[Java] re try catch  (0) 2021.02.09
[Python] has key dict  (0) 2021.02.09
[Sh] date this sunday `date +%Y%m%d -d 'next sunday - 1 week'`  (0) 2021.02.03
[Java] StringUtils.repeat("asdf", 3)  (0) 2021.01.31
[jQuery] each()  (0) 2021.01.31
[JS] moment.js moment().format('YYYY-MM-DD')  (0) 2021.01.31
댓글
댓글쓰기 폼