Hi pls I'm new to shell scripting. I need to write a shell script that will ask for 2 parameters, one for startdate and another for number of days.
Then loop from start date to number of days and print each date. E.g 16-09-2022 and 4 will print: 16-09-2022 17-09-2022 18-09-2022 19-09-2022
Tried this:
#! /bin/bash
echo "enter date"
read var1
echo "enter no of days"
read var2
for i in {0..$var2..1}
do
echo $i $var1
(here's where I'm trying to figure how to increment the dates)
done
Thanks