I've been trying to read numeric input from the terminal in Bash (Two separate approaches. First is directly entering numbers into the CLI and second reading the numbers from a file) and saving it in an array, sorting the array and showing the result. (The original problem stated that the input is saved in an array and then sorted)
I don't know if it's better to save it in a file and sort the values in the file or directly the input from the terminal into the array and sorting it afterwards. I have searched for both methods.
Thank you.
P.S. I've read many sources and links but unfortunately I couldn't come across a solution. I've tried using loops and prompting the user in asking how many numbers they want to feed in as the input but it was doomed to failure.