Pass a bash array as an argument

I have a bash script in which I’m using an array to get a list of files and I needed to pass the content of this array as an argument, to send an email to some users. This is the array: RAW_LIST="$(echo "ls -1 /download")" declare -a LIST readarray -t LIST <<<"${RAW_LIST}"RAW_LIST="$(echo "ls -1 /download")"… Continue reading “Pass a bash array as an argument”

Check software RAID script

Here’s a Bash script to check software RAID that will send an e-mail reporting the array status: #!/bin/bash # EMAIL=""   if egrep "\[.*_.*\]" /proc/mdstat¬† > /dev/null then logger -s "mdcheck: RAID devices ERROR" echo "Software RAID devices ERROR on ${HOSTNAME}" | /bin/mail -s \ "$0: Software RAID devices ERROR on ${HOSTNAME}" ${EMAIL} else… Continue reading “Check software RAID script”