I would like to do something like this in terminal
$ ruby quicksort.rb unsorted.txt
quicksort.rb is the ruby file I would like to run unsorted.txt is the input file that contains unsorted numbers. Is it possible to do something like this in ruby?
Thank you.
You can read the commandline arguments and do a file operation. to read arguments you can use
This way you can get the filename and get the content.