I have a file where a bunch of variables are defined. It could be one, four or twenty. They have names such as ipt_rss
and bhd_rss
. Let's call these variables var_i
Now, I'd like to let bash loop over these variables like this:
for all i in var_i do
command1 arg command2 arg $var_1 > /some/directory/$var_i.rss
echo "Success finding $var_i"
done
How can I accomplish that?
See Question&Answers more detail:os