arvinp 0 Newbie Poster

Hey guys, I'm trying to write a code that reads in a .dat file from the SSH shell command line.

example: java Prog1 xxxx

so from the shell command line i want it to run Prog1 then read in the contents of the xxxx file

All the code I look at online shows me how to write the code using an existing file... I want to write the code taking in an entirly new file from the command line... after this I simply just want to print out the contents of the dat file after is has read it in....

example:
this is all from the SSH shell command line

java Prog1 xxx.dat
"contents of the xxx.dat go here"

thanks for the help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.