#!/bin/bash
for i in $( ls fil_*.gpg )
do
    sha1=$( sha1sum ${i} | cut -d " " -f1 )
    mv ${i} ${sha1}.gpg
    echo "${sha1} -> ${i}" >> temp_sha1.fil
done
if [[ -n $1 ]]
then
    sort temp_sha1.fil > $1
else
    sort temp_sha1.fil
fi
rm temp_sha1.fil
