Avrdude not working with Arduino Micro

I found command line - How to connect to a serial port as simple as using SSH? - Unix & Linux Stack Exchange.

Hacked it a bit and it does reset a Leonardo (Ubuntu 12.04; yes I need an update)

#!/bin/sh

# connect.sh

# Usage:
# $ connect.sh <device> <port speed>
# Example: connect.sh /dev/ttyS0 9600

# Set up device
stty -F $1 $2

dmesg | tail -f

# Let cat read the device $1 in the background
cat $1 &

# Capture PID of background process so it is possible to terminate it when done
bgPid=$!

# Terminate background read process
kill $bgPid
dmesg | tail -f

I added dmesg to see, but not sure if it's useful.

Run with port and baudrate as parameters.