1

[SOLVED] Adding a character in each line depending upon number of such characters present in a line.

view story
linux-howto

http://www.linuxquestions.org – Hi !, How to add a character in front of each line depending upon number of such character present in that line.For eg. Input.txt is london.uk 10.wrs.org baby.us target.zym.com . . . So...on Output.txt results in: .london.uk # "." is added at the beginning of the line because number of "." present in this line was 1 10.wrs.org # "." is not added at the beginning of the line because number of "." present in this line was 2 .baby.us target.zym.com . . . So...on Please Note: # lines are not the part of file output.txt, they are just for explanati (HowTos)