Post History
Zsh, 8 bytes >$@ <^$1 Attempt This Online! Outputs via exit code: 0 for not all the same; 1 for all the same >$@: create a file named for each element in the input effectively de...
Answer
#1: Initial revision
# [Zsh](https://www.zsh.org), 8 bytes <pre><code>>$@ <^$1</code></pre> [Attempt This Online!](https://ato.pxeger.com/run?1=m724qjhjc7SSrm5qRUlqXkpqim56Tn6SUuyCpaUlaboWK-xUHLhs4lQMIdylNjY2KvYQ9upoAx1DIDTTMYepBgA) Outputs via exit code: `0` for not all the same; `1` for all the same - `>$@`: create a file named for each element in the input - effectively deduplicates because you can only have one file with a given name - `<^$1`: try to find a file with any name other than the first input. If there were at least two distinct inputs, this will succeed and return `0`, otherwise it will fail with status `1`