read file start from different positions
Hi all,
I have a file which contains some specials chars to gather one for each line. For example if the special char is $ (dollar) the file may looks like:
Code:
hello world $ hello
$ hello world
hello world hello world $
I have to gather the $ and ignore the rest. I found a solution but not efficient. In fact once I found the $ is there a way to jump directly to the next row without keep reading ?
The second row in the example contains the $ at the beginning and it is useless to keep reading after the first char.
Is there any other solution?
Thanks in advance