i have file
Which contains numbers and strings in this form
1,2,ssh,4,5
sor,7,8,bbt,10
How can I read the numbers/string one by one in a loop?
I tried to read like that:
input = new Scanner(data_to_insert);
String data;
while (input.hasNext()) {
data = input.next();
data = data.replaceAll(",", "");
println("data to hash ->" + data);
But I get for example:
data to hash ->12345
And I wanted to get first 1 after that 2 and so on
like this:
data to hash ->1
data to hash ->2
.
.
.
data to hash ->5