Dedupe

array_dedup

Print array elements with duplicates removed, preserving order.

Example

array_dedup 1 1 2 2 3 3 3
# => 1 2 3 (one per line)

Arguments

  • ... (any): Array elements passed as arguments

Exit codes

  • 0: Always

Output on stdout

  • Each unique element on its own line, in first-seen order