diff options
| author | Zach DeCook <zachdecook@librem.one> | 2021-10-11 15:05:32 -0400 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2021-10-11 15:05:32 -0400 |
| commit | b5f1684628e292d44ca00921900402258422b227 (patch) | |
| tree | ea1532e0f68ed3ae2406562ae4e03359e0f7cc26 /makeDir.sh | |
| parent | 7c22f7a4006e2cf154a301529aa8b93fce42f735 (diff) | |
| download | swipeGuess-b5f1684628e292d44ca00921900402258422b227.tar.gz | |
make method to split file into multiple files based on first and last letters
Diffstat (limited to 'makeDir.sh')
| -rwxr-xr-x | makeDir.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/makeDir.sh b/makeDir.sh new file mode 100755 index 0000000..aa9f782 --- /dev/null +++ b/makeDir.sh @@ -0,0 +1,9 @@ +#!/bin/sh +dir="$1" +rm $dir/* +source functions.sh +while read -r line; do + fl=$(firstLetter "$line") + ll=$(lastLetter "$line") + echo "$line" >> "$dir/$fl$ll" +done |
