Linux Commands-Date:To find first day or last day of particular month

How to find the first day or last day of a particular month in linux using DATE

First day:
date -d "-$(($(date +%d)-1)) days" +%d-%m-%Y

Last day:
date -d "1 month -$(date +%d) days"  +%d-%m-%Y



Comments

Popular posts from this blog

Configure, Modify, Rename,Delete a listener for Oracle 11g database

Oracle DB:Oracle 12C DB installation Error -Failed to access the temporary location

OSB : DB Adapter-Poll - Delete Logical Records using Oracle Service Bus 12c