#!/bin/bashtops=("T-shirt""Blouse""Sweater""Jacket""Hoodie")bottoms=("Jeans""Skirt""Trousers""Shorts""Leggings")shoes=("Sneakers""Boots""Sandals""Flats""High heels")accessories=("Necklace""Hat""Watch""Sunglasses""Belt")days=("Monday""Tuesday""Wednsday""Thursday""Friday")########################### FUNCTION DEFINITION ###########################functionselectWardrobe(){echo"Now selecting weekly wardrobe"fordayin"${days[@]}";dor_top=${tops[$((RANDOM%${#tops[@]}))]}r_bot=${bottoms[$((RANDOM%${#bottoms[@]}))]}r_sho=${shoes[$((RANDOM%${#shoes[@]}))]}one_acc=${accessories[$((RANDOM%${#accessories[@]}))]}two_acc=${accessories[$((RANDOM%${#accessories[@]}))]}echo"On $day, you should wear: $r_top, $r_bot and $r_sho"echo"Pair with: $one_acc 1 and $two_acc 2"echodone}########################### FUNCTION DEFINITION ###########################functionoutfitSelection(){whiletrue;doread-p"Accepting an integer between 1-52: "numweekif[[$numweek-gt1&&$numweek-lt52]];thenecho"Generating outfit selection for $numweek weeks"declare-iworkWeek=0while(($workWeek<$numweek));doecho"Week $((workWeek+1)) Wardrobe: "selectWardrobe((workWeek++))donebreakelseecho"Integer must be between 1-52"fidoneecho"Enjoy $numweek weeks of outfit selections"}outfitSelection4>monthlyOutfit.txt# 4 is the argumentinput_file="monthlyOutfit.txt"if[[-e"$input_file"]];then# Read lines from the filewhileIFS=read-rline||[-n"$line"];do# -r for not treating special charactersecho"$line"done<"$input_file"elseecho"File not found: $input_file"fi