how to check date is older than x days in shell script
Shell
datetime='2016-08-31T15:38:18Z'
timeago='90 days ago'
dtSec=$(date --date "$datetime" +'%s')
taSec=$(date --date "$timeago" +'%s')
echo "INFO: dtSec=$dtSec, taSec=$taSec" >&2
[ $dtSec -lt $taSec ] && echo too old
Also in Shell:
- Title
- bash copy
- Category
- Shell
- Title
- linux check ubuntu version
- Category
- Shell
- Title
- shell file in linux
- Category
- Shell
- Title
- git add
- Category
- Shell
- Title
- vieuw the MOTD linux
- Category
- Shell
- Title
- list packages linux windows
- Category
- Shell
- Title
- shell set environment variable
- Category
- Shell
- Title
- how to revert to previous kernel ubuntu
- Category
- Shell
- Title
- how to upload on github with command
- Category
- Shell
- Title
- make recursive directory linux
- Category
- Shell
- Title
- javascript execute powershell script
- Category
- Shell
- Title
- how to uninstall rust
- Category
- Shell
- Title
- ubuntu intall OpenBLAS
- Category
- Shell
- Title
- git push all branches
- Category
- Shell
- Title
- is it possible to check with my website if an app is installed?
- Category
- Shell
- Title
- set default java version
- Category
- Shell
- Title
- crop video from specific time to specific time ffmpeg
- Category
- Shell
- Title
- grep search for text in php files recursive
- Category
- Shell
- Title
- linux find file
- Category
- Shell
- Title
- git merge pushed commits
- Category
- Shell
- Title
- how to install pip in anaconda
- Category
- Shell
- Title
- bash endless loop
- Category
- Shell
- Title
- whats up with docker compose and orphan containers
- Category
- Shell
- Title
- exa ls command
- Category
- Shell
- Title
- vim compare 2 files
- Category
- Shell
- Title
- cordova ios emulators
- Category
- Shell
- Title
- asdf node fingerprint
- Category
- Shell
- Title
- vim command to open a file
- Category
- Shell
- Title
- wheres i3 config file
- Category
- Shell
- Title
- bash pass all arguments
- Category
- Shell
- Title
- revert last merge git
- Category
- Shell
- Title
- angular add universal
- Category
- Shell
- Title
- git remove all pdf files
- Category
- Shell
- Title
- install webpack
- Category
- Shell
- Title
- how to update local repo when i make changes to github remote repo
- Category
- Shell
- Title
- rename remote branch in git
- Category
- Shell
- Title
- bash case statement
- Category
- Shell
- Title
- grep
- Category
- Shell
- Title
- ubuntu ram type
- Category
- Shell
- Title
- install phpmyadmin ubuntu 18.04
- Category
- Shell
- Title
- how to zip a file in linx
- Category
- Shell
- Title
- how to delete services in kubernetes
- Category
- Shell
- Title
- combine strings bash
- Category
- Shell
- Title
- git config username
- Category
- Shell
- Title
- Error while finding module specification for 'virtualenvwrapper.hook_loader' - ubuntu 20
- Category
- Shell
- Title
- kill port ubuntu
- Category
- Shell
- Title
- read string by string in file in linux
- Category
- Shell
- Title
- terminal how to find a directory
- Category
- Shell
- Title
- createa. branch off of development git
- Category
- Shell
- Title
- download images from url terminal
- Category
- Shell
- Title
- npm install bootstrap 3.3.7
- Category
- Shell
- Title
- install AdminLTE
- Category
- Shell
- Title
- conda install paraview
- Category
- Shell
- Title
- SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused : connect@src/mongo/shell/mongo.js:341:17 @(connect):2:6
- Category
- Shell
- Title
- shell count number of columns
- Category
- Shell
- Title
- git remove branch
- Category
- Shell
- Title
- screen recorder linux
- Category
- Shell
- Title
- ubuntu camera not longer found
- Category
- Shell
- Title
- unable to install deno in ubuntu
- Category
- Shell
- Title
- kubernetes service external ip pending
- Category
- Shell
- Title
- how to set date in linux
- Category
- Shell
- Title
- xcuserstate file git
- Category
- Shell
- Title
- check if kubernetes is running
- Category
- Shell
- Title
- kill process on port
- Category
- Shell
- Title
- nvcc not working after installing cuda
- Category
- Shell
- Title
- undo git
- Category
- Shell
- Title
- git get remote branches
- Category
- Shell
- Title
- fast rsync
- Category
- Shell
- Title
- find out a branch a parent branch git
- Category
- Shell
- Title
- how to turn off bluetooth in ubuntu 18.04 terminal
- Category
- Shell
- Title
- how to use curl command in ubuntu
- Category
- Shell
- Title
- linux edit file
- Category
- Shell
- Title
- remove all iptables rules
- Category
- Shell
- Title
- install terminator in ubuntu
- Category
- Shell
- Title
- apache virtual host
- Category
- Shell
- Title
- how to upload files to s3 bucket from mac shell
- Category
- Shell
- Title
- reset branch on local git
- Category
- Shell
- Title
- bash string starts with
- Category
- Shell
- Title
- firewalld not running centos 7
- Category
- Shell
- Title
- github compare commits
- Category
- Shell
- Title
- check powershell version
- Category
- Shell
- Title
- change user linux
- Category
- Shell
- Title
- remove .svn recursively linux
- Category
- Shell
- Title
- @react-navigation/drawer install
- Category
- Shell
- Title
- how to bash into docker container
- Category
- Shell
- Title
- what does pro mean in github
- Category
- Shell
- Title
- how to install jupyter notebook in windows 10
- Category
- Shell
- Title
- linux replace string in files recursively
- Category
- Shell
- Title
- delete github repository without browser
- Category
- Shell
- Title
- composer drupal install
- Category
- Shell
- Title
- npm install mongoose error npm ERR! code ENOSELF
- Category
- Shell
- Title
- remove systemd service
- Category
- Shell
- Title
- how to make new user linux termil
- Category
- Shell
- Title
- how to grep if the first letter is a character not a number
- Category
- Shell
- Title
- htaccess secure
- Category
- Shell
- Title
- powershell foreach
- Category
- Shell
- Title
- linux see when file created
- Category
- Shell
- Title
- remove git from project
- Category
- Shell
- Title
- docker remove all images powershell
- Category
- Shell
- Title
- linux loop over all arguments one by one
- Category
- Shell