Reputation: 29
i am currently working in linux environment and working on generating an executable. Purpose of the application(executable) is to validate contents in the given input file.
i am required to write a script , where it will iterate through all different available time zones and run the EXE.
i am having little bit basics on writing the bash scripts , but this task seems a little difficult task for me to concoquer , any clues how can i achieve this.
Upvotes: -1
Views: 126
Reputation: 111
This should do the trick. Remember, in variable time_zone we insert each timezone code/value.
#! /bin/bash
time_zones=( "UTC-12:00" "UTC-11:00") #array needs expansion in your case
for time_zone in "${time_zones[@]}"
do
echo $time_zone
#here you can call the executable or do whatever you want
# ./executable.sh $time_zone for example
done
Upvotes: 1