In a shell environment, doing arithmetic on various columns, awk is your friend. (Well, I guess it isn't really friendly, but it is efficient and useful). You can use expr, but awk is easier (once you understand it) and faster, if that matters.
I don't understand your 'need to find file from any given location' requirement. If the file has an absolute path, use it. If it has a path relative to $HOME or some other variable, use the variable. If you need to let the user specify it, make your tool into an executable script and require a file name argument: Interactively reading an answer is not very 'unixy'.