remove-duplicate-lines.sh 190 B

12345678910
  1. #!/usr/bin/env bash
  2. set -euo pipefail # bash strict mode
  3. temp="/tmp/temp.txt"
  4. for file ; do
  5. uniq "$file" > "$temp"
  6. # awk '!seen[$0]++' "$file" > "$temp"
  7. cp "$temp" "$file"
  8. done