port=$(ls -rt /dev/ttyACM* | tail -1) echo avrdude -P $port -c arduino -p m328p -U flash:w:$(ls -rt *.hex | tail -1) avrdude -P $port -c arduino -p m328p -U flash:w:$(ls -rt *.hex | tail -1) 2>/dev/null