Commit ec1463dd authored by Caleb Cooper's avatar Caleb Cooper
Browse files

Add new file

parents
#! /bin/bash
declare -a INPUT=( $@ );
declare -a PRESENT
declare -a DUPES
for i in ${INPUT[*]}; do
if [[ "${PRESENT[*]}" =~ ${i} ]]; then
if [[ ! "${DUPES[*]}" =~ ${i} ]]; then
DUPES+=( ${i} )
fi
else
PRESENT+=( ${i} )
fi
done
printf "Duplicates: %s \n" ${DUPES[*]}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment