Unlock and mount LUKS disks via bash script

Do something like…

#!/bin/bash

echo "Enter Password: "
read pass

echo $pass | sudo cryptsetup luksOpen /dev/sdb1 media1
echo $pass | sudo cryptsetup luksOpen /dev/sda1 media2

sudo mount /dev/mapper/media1 /mnt/media1
sudo mount /dev/mapper/media2 /mnt/media2

echo "Media Partitions Mounted"