Please could somebody explain how lines 3 and 8 work in this portion from a BASH script that I'm a bit confused with? It's to work out which USB drive to use for a backup. Many thanks.
1 WEEK_NO=`date +%U | sed -e 's/^0\+//g'`
2
3 (( USB_NN_IDX = $WEEK_NO % 2 ))
4
5 USB_DRIVES[0]="usb03"
6 USB_DRIVES[1]="usb04"
7
8 USB_NN=${USB_DRIVES[$USB_NN_IDX]}