Add Shell script to sort file content

This commit is contained in:
Xephi 2015-12-09 16:43:27 +01:00
parent 30f4a00e3b
commit e99161f3ac

View File

@ -0,0 +1,6 @@
#!/bin/sh
#
# That script sort the content of all files in the current directory
#
ls | grep -v .sort | while read file; do sort "$file" > "$file".sort; done
for file in *.sort; do mv "$file" "${file%%.sort}"; done