#!/bin/dash export DEBDIR="/tmp/bashdebs" [ -d $DEBDIR ] && rm -fr $DEBDIR rm -f /tmp/bashdebs.tgz cd /tmp/ && wget --quiet http://s3.amazonaws.com/com.versal.sysops/shellsock/bashdebs.tgz && tar zxvf bashdebs.tgz cd $DEBDIR && sudo /usr/bin/dpkg -i *.deb 2>&1 1>/dev/null #Test after update bashver=`/usr/bin/dpkg -l bash | tail -1 | awk '{print $3}'` echo "Host `hostname`, post update, with Bash $bashver" rm -f echo && env -i X='() { (a)=>\' bash -c 'echo id'; cat echo