I have one shell script which is taking date as input in YYYYMMDD format. I need to put a validation for the user input, so that it should accept only greater than one week's after date (eg. if today is 20140703, then it should accept 20140710 or greater than that), and no string, only 8 digit numeric value.
My existing code to read the date and capturing next one week date is
echo "Please enter a date in YYYYMMDD format" read my_date next_week_date=$(date --date "+1 week" +%Y%m%d) How i should procceed with the validation.