Compiling java on each line in a file as input : I am new to bash Scripting.
I want to run a java program on script on each line of a file

I am writing this script, but I don't know what's the correct script. I however am able to extract all the lines individually. Following is the script I use:

    #!/bin/bash
    
    IFS=$'\n'	# make newlines the only separator
    set -f          # disable globbing
    for i in $(cat "$1"); do
            java Interpreter $i >output.txt   
    done

I want the output to be in a file or atleast on the screen.
Interpreter is the name of my program.

Thanks in advance. :)
