Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Author: Napoleon Martin
# fileinpector.sh
# Desciption: The script searches a directory for files, looks up their filetype in the
# filetable.txt and rename the files using the correct extension using
# pattern matching. It must be able to work more than once without appending
# pattern duplicate extensions eg. file.txt.txt is not acceptable.
# Makes sure that fileinspector.sh can handle a single file or directory.
set -x