I'm trying to write a bash script that loops 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 code above is obviously wrong. But I want i & j to move in lock step with one another. Can someone help me with a way to achieve this?
Thanks