Need help to run query in loop for all acct nbr in a file..

I have a txt file with contents of acct nbr's like:

22222222222
33333333333
33445566778

I need to write a script which takes each acct nbr in the file and run the query like:

select seq_nbr from event where acct_nbr='22222222222'

and the query's output should be passed to a process like

MoveFile <seq_nbr>

The same should be done for all the acct nbr's in the file..
Can any one please guide me :wall: