I have this script where I can pull a string based on the line and position of it. I got it working for one file, but how do I get it to work for all files in a directory.
Here is the code:
def pull_value(files, line_num, gbegin, gend)
File.readlines(files)[line_num][gbegin..gend]
end
puts ("some/directory/file.txt", 10, 1, 7)