My script asks for a name, phone number, and date of birth and then amends these details to a comma separated value file called “birthday.csv”.
It then Sorts “birt
Firstly remove the brackets around "$(currentDay)" and "$(currentDay)"
One bug you have, at least:
if [[ "$currentMonth" -lt "$birthMonth" ]] || [[ "$currentMonth" -eq "$birthMonth" && "$(currentDay)" -lt "$($birthDay)" ]]
"$(currentDay)"
should be just "$currentDay"
and "$($birthDay)"
should be just "$birthDay"
.
You also have a typo here:
currentMonth=${currenDate:0:2}
That should be currentDate
. Put set -u
at the top of your script to catch such mistakes.
Also, like Mat said, I don't see any sorting code :)