Skip to content

The shell script `amend-DuplicateFilename(-fileExtn-testName)(ver.01).sh` recursively checks if there is a duplication of filename and prints an appropriate filename.

Notifications You must be signed in to change notification settings

ChimaTech/amend-a-DuplicateFilename

Repository files navigation

Amend a Duplicate Filename.

Inputs :

  • fileExtension (string, 1st argument)
  • initial_testName (string, 2nd argument)

Output:

  • filename (string)

Output Format:

  • string

Description.

The shell script amend-DuplicateFilename(-fileExtn-testName)(ver.01).sh recursively checks if there is a duplication of filename and prints an appropriate filename.

It compares the initial_testName with existing filenames for each file with the file extension fileExtension.

It then prints:

  • $initial_testName-$appendixString, if initial_testName already exist, or
  • $initial_testName, if initial_testName doesn't already exist.

HOW TO RUN.

Example:

bash "amend-DuplicateFilename(-fileExtn-testName)(ver.01).sh" "mp3" "Obi"

About

The shell script `amend-DuplicateFilename(-fileExtn-testName)(ver.01).sh` recursively checks if there is a duplication of filename and prints an appropriate filename.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages