Create a shell program for selection sort, taking input from a file generated by another shell program.
- Start the Program: Start the program "random_gen.sh".
- Input Range: Read the values of
$start
and$end
from the terminal. - Generate Random Values: Generate random values from
$start
to$end
and save them in a file named "random_gen.txt". - End Program
- Start the Program: Start the program "main.sh".
- Read Data: Read values from the file "random_gen.txt" into the array
$dataPline()
. - Sort Data: Use the selection sort algorithm implemented as a shell program to sort the array.
- Save Result: Save the sorted result into the file "result.txt".
- Display Result: Display the sorted result in the terminal.
- End Program
-
/Mini_Project_2: Contains files related to the Selection Sort program.
random_gen.sh
: Shell script for generating random values.main.sh
: Shell script for selection sort.random_gen.txt
: File containing randomly generated values.result.txt
: File containing the sorted result.README.md
: Documentation for Mini Project 2.
-
README.md
: Main README file providing an overview of both mini projects.
Feel free to explore each directory for detailed explanations and code implementation. Happy coding!