Commit 083062e8 authored by Peter Kovary's avatar Peter Kovary
Browse files

Propper bash array append

parent 5ca642ac
......@@ -24,7 +24,7 @@ if [ ! -f "$hostsFile" ]; then
hostname=(`host $ip | awk '/pointer/ { print $5 }' | sed -e 's/\./ /g' | awk '{print $1}'`)
if [[ "$hostname" =~ ^[a-z]+[0-9]{2}$ ]]
then
hostlist+="$hostname "
hostlist+=("$hostname")
fi
done
echo ${hostlist[*]} | sed -E 's/(cider|lexis)[0-9]{2}//g' > "$hostsFile"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment