Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 5 lines (3 sloc) 385 Bytes
#!/bin/bash
cat current-websites-wiki.txt | sed -r "s/( )*(==)( )*/\2/g" | sed -r "s/(==\[\[?|\]\]?==)/==/g" | sed -r "s/==([^\|]+\|)?/==/g" | sed ':a;N;$!ba;s/\n//g' | sed -r "s/==([^*])/\n==\1/g" > temp.txt
sort temp.txt | sed -r "s/==\*/==\n\*/g" | sed -r "s/\*/\n\*/g" | sed -r "s/^==/\n==/g" | sed -r "s/^==/==\[\[/g" | sed -r "s/==$/\]\]==/g" > current-websites-wiki-sorted.txt