#show the new image and kill the previous instance of the image viewer
# open a new image viewer and write its pid to new-pid
sxiv -f -b -a -s f archillect-currentimage &echo$! > new-pid
# checking whether the process with old-pid is really the old image viewer
# checking whether old-pid is really just a number, exists and is not empty
# disabled: compare the value in old-pid with the running process id for the image viewer, (where both must not be empty at the same time, has been checked already)
# if the running pid of the old image viewer matches the one saved previously by the script, kill the old image viewer