So I am writing a date calculation Bash and I am having issues with date format. Maybe I am just writing it wrong, any insite is helpful
#!/bin/bash echo -e "bill date" read date d1=$(date -d "$date +27 days") d2=$(date -d "$date +45 days" ) echo "$(tput bold setaf 3)Suspension date = $d1" echo "$(tput bold)$(tput setaf 1)Termination date = $d2"
What I would like is the output to be: Suspension date = Mon Nov 6 2017
what I get is Suspension date = Mon Nov 6 00:00:00 EST 2017
I have tried many variations of and placements of +'%a %B %d %Y' and I keep getting invalid date errors.
hitting my head against my desk and wall have not knocked anything loose so far.