#!/bin/bash
var="/home/rajat/Downloads/Earth/Europe/Ukraine/Kiev/*"
for entry in $var;
do
	var1=$(file --mime-type -b $entry)
	 if [ "$var1" = "text/html" ]
        then
       	mv $entry $entry.html
    elif [ "$var1" = "application/gzip" ]
        then
       	mv $entry $entry.gz
    elif [ "$var1" = "image/jpeg" ]
        then
       	mv $entry $entry.jpg
    elif [ "$var1" = "text/x-c" ]
        then
       	mv $entry $entry.c
     fi
done


