Skip to content

Commit

Permalink
Add function for sorting GNU-style checksum lists
Browse files Browse the repository at this point in the history
  • Loading branch information
Alhadis committed Sep 15, 2022
1 parent 68be173 commit 2feb422
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,17 @@ ppls(){
}


# Alphabetise a list of SHA-256 checksums
sortsha(){
for i in "$@"; do
[ -s "$i" ] || continue
sorted=`sort -sk2 "$i" | grep .`
printf '%s\n' "$sorted" > "$i"
done
unset sorted
}


# Print names of files containing binary (non-textual) data
listbinary(){
for i in "$@"; do
Expand Down

0 comments on commit 2feb422

Please sign in to comment.