#!/bin/sh for i in $@ do BAS=`basename $i .nmea` KML=$BAS.kml gpsbabel -t -i nmea -f $i -o kml,units=m -f $KML done