I have the following beginning to a bash script;
#!/bin/bash
echo "Starting ..."
while IFS="" read -r day || [ -n "$day" ]; do
while IFS="" read -r meal || [ -n "$meal" ]; do
echo "Please select a recipe for $meal on $day"
done < lists/meals
done < lists/days
However, the output is this;
$ ./create.sh
on mondayect a recipe for breakfast
on mondayect a recipe for lunch
on mondayect a recipe for dinner
Please select a recipe for snack on monday
on tuesdayct a recipe for breakfast
on tuesdayct a recipe for lunch
on tuesdayct a recipe for dinner
Please select a recipe for snack on tuesday
on wednesday a recipe for breakfast
etc...
I was expecting it to read;
$ ./create.sh
Please select a recipe for breakfast on monday
Please select a recipe for lunch on monday
Please select a recipe for dinner on monday
Please select a recipe for snack on monday
Any idea what is going on here?
Thank you.