mirror of
https://github.com/G2-Games/anagram-finder.git
synced 2025-04-19 03:12:52 -05:00
6 lines
204 B
Bash
Executable file
6 lines
204 B
Bash
Executable file
#!/bin/bash
|
|
inputfile=$1
|
|
rm "sorted$inputfile" &>/dev/null
|
|
while IFS= read -r line; do
|
|
echo $(printf "%s\n" "$line" | sed -- 's/./\0\n/g' | sort | tr -d -- "\n") >> sorted$inputfile
|
|
done < $inputfile
|