From b5f1684628e292d44ca00921900402258422b227 Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Mon, 11 Oct 2021 15:05:32 -0400 Subject: make method to split file into multiple files based on first and last letters --- makeDir.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 makeDir.sh (limited to 'makeDir.sh') 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 -- cgit 1.4.1