Add Shell script to sort file content
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user