#!/bin/sh
rm -f s$1
for i in $(<$1); do
  echo $i|sed s/-[^-]*-[^-]*-[^-]*$// >> s$1
done
