#!/bin/bash clear echo " **************************************** Split/Rejoin Files What would you like to do today? Split Files=(S) Rejoin Files=(R) ****************************************" read routine if [ $routine = s -o $routine = S ] then ### Split File Routine ### echo " ## This script will split specified files ## ## into smaller chunks of specified size. ## ## The chunks will be placed in a ## ## specified directory on the Desktop. ## ## Systems Boy 12/31/04 ## " echo " Enter file to split..." read file echo " Enter chunk size (in MB - 2000 MB maximum)..." read size echo " Name chunks directory..." read chunksDir mkdir ~/Desktop/"$chunksDir" echo " Enter chunks name..." read chunksName echo " Creating chunks. Please wait... " split -b "$size"m "$file" ~/Desktop/"$chunksDir"/"$chunksName". open ~/Desktop/"$chunksDir" echo " Splitting complete! Check the directory $chunksDir on the Desktop for the split files. Bye! " else if [ $routine = r -o $routine = R ] then ### Rejoin File Routine ### echo " ## This script will rejoin a specified ## ## folder of split files. ## ## The rejoined file will be placed in ## ## the directory specified by the user. ## ## Systems Boy 12/31/04 ## " echo " Enter directory containing files to be rejoined..." read rejoinDir cd "$rejoinDir" echo " Enter name of rejoined file..." read name echo " Where would you like to save the rejoined file?..." read saveDir echo " Rejoining files. Please wait... " cat * > "$saveDir"/"$name".ReJoined echo " Rejoining complete! Enjoy your big fat file! " open "$saveDir" else echo " You must enter "S" or "R" to choose a routine. Please try again. " fi fi exit 0