Bash script loop through two variables in blocking step
I am trying to write a bash script that goes through two variables:
#!/bin/bash
for i in sd fd dir && j in storage file director
do
echo "restarting bacula $j daemon"
/sbin/service bacula-$i restart
echo
done
The above code is clearly wrong. But I want me and j to move in a blocking step with each other. Can anyone help me on this to achieve this?
thank
+3
source to share