Hey guys, I was doing some basic bash shell script, as I am new to this, and I can't seem to pass over this error. Here is the code:
#!/bin/bash echo "Please, type in the day of the week." read Day if (($Day="Monday"));then Monday=date +%d Tuesday=$(($Lunes+1)) Wednesday=$(($Martes+1)) Thursday=$(($Miercoles+1)) Friday=$(($Jueves+1)) Saturday=$(($Viernes+1)) Sunday=$(($Sabado+1)) else echo "As updates only occur on Monday, an update will not be necessary yet." fi echo "Today date is: "; date +%A,%d" of "%B,%Y echo "To-do list:"
Anyways, my intention is that If I type Monday, the variables would be assigned, but even if I type Monday, bash interprets it like if I had typed something else, and give me the "As updates only occur on Monday, an update will not be necessary yet." message. Any suggestion? Thanks!