I would like to insert n number of characters at the beginning of each line that starts with a given character. If possible, I would be most appreciative for a sed or awk solution.
Given the data below, I would like to be able to insert either 125 spaces or 125 "-" at the beginning of every line that begins with "@".
Thank you so much for this Don. In reviewing your code, I left things a bit ambiguous in my original post. I meant to say either 125 spaces or *125* dashes ("-"). I very much like the elegance of:
awk '/^@/{$0 = "-" $0}1' file
Is there a way that awk can be told to do 125 of the leading "-"? Or is the only solution to substitute "-" for "/s" in: