how to compare string in file i mean compare that string content digit or alphabet,and 1 question more can we count that line if first line variable = 1,if read second line variable = 2 and so on thanks
e.g
i have file with name data.txt with file like this
123456
abcdef
456897
asdffg
789654
gfdsah
the question how to compare that file and i now that string with content alphabet or number
and i want make make new file data2.txt from data.txt like this
123456 456897 789654 123456 abcdef 123456 asdffg gfdsah