Insert % in front of string

Microsoft Windows xp home edition - comp...
July 29, 2010 at 16:53:34
Specs: Windows XP
I am trying to write a Batch script, to be used with some .abc related batch files. I need to place a percentage sign in front of an information field.
So 1st, it will find each instance of R: at the beginning of a line. R:is the Header information field for Rhythm <R:Jig>
Then the script will insert the percentage sign at the beginning of the line <%R:> Finally it will output a .txt file with the new changes.
I want to use the Windows command prompt because that is how I have written my .abc batch scripts.

abcm2ps reads %R: as a comment & does not print what is on that line. It does now when I use the command %%writehistory

See More: Insert % in front of string

Report •

July 29, 2010 at 18:13:31
downloadsed for windows. then use it one liner

c:\test> sed "s/^<R/%R/" file

GNU win32 packages | Gawk

Report •

July 29, 2010 at 21:03:13
It's beginning to look like sed is the way to go. I understand it is probably the shortest way to write this script. Thanks for the link.
My other batch files have worked for everything I needed up to this point. So, I was hoping to suss this one out.

Report •

Related Solutions

Ask Question