#!/bin/bash


name=$1
count=$2

mkdir tmp

export TMPDIR=tmp

if [[ -n $count ]]
then
  head -$count $name.flst | convert @- $$.${name}_${count}.mpg
else
  count=ALL
  cat $name.flst | convert @- $$.$name_${count}.mpg 
fi

echo Created $$.${name}_${count}.mpg


