Join And Sort Text

Make Three Files, Each With List Of Fruit

echo "Apple" >> fruit_1.txt; echo "Banana" >> fruit_1.txt; echo "Orange" >> fruit_1.txt
echo "Tangerine" >> fruit_2.txt; echo "Grape" >> fruit_2.txt; echo "Nectarine" >> fruit_2.txt
echo "Strawberry" >> fruit_3.txt; echo "Blueberry" >> fruit_3.txt; echo "Mango" >> fruit_3.txt

Merge And Sort Into New File

sort fruit_1.txt fruit_2.txt fruit_3.txt > fruit.txt

View Contents Of New File

cat fruit.txt
Apple
Banana
Blueberry
Grape
Mango
Nectarine
Orange
Strawberry
Tangerine